-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hello!
When having multiples store instances in one tab, how would you disconnect a single one?
The only disconnect function I found in the documentation is window.__REDUX_DEVTOOLS_EXTENSION__.disconnect() which disconnects all store instances at once.
Example:
const connectionA = window.__REDUX_DEVTOOLS_EXTENSION__.connect({name: "store a"})
connectionA.init("value1")
const connectionB = window.__REDUX_DEVTOOLS_EXTENSION__.connect({name: "store b"})
connectionB.init("value2")
When calling window.__REDUX_DEVTOOLS_EXTENSION__.disconnect() this would disconnect all stores.
Is there something like connectionA.disconnect() or window.__REDUX_DEVTOOLS_EXTENSION__.disconnect(connectionA) to only disconnect one and removing it from the instances dropdown?

I also found connectionA.unsubscribe(), but it only removes the listeners applied with connectionA.subscribe(), but not remove it from the instances dropdown in the extension.
If it's not a feature yet, is it planned to introduce something like that?