redux-devtools icon indicating copy to clipboard operation
redux-devtools copied to clipboard

Remove Store

Open MethodenMann opened this issue 7 years ago • 8 comments

We're working with subapps and therefore have many independent apps with an own store. Adding them to dev-tools works great. But as soon as we remove an app we also want to remove the store from dev-tools. Otherwise we end up with too many store in a short time. Is there a way to do so? Thanks

MethodenMann avatar May 30 '17 05:05 MethodenMann

+1 - have been searching for a way to do this same thing. We are using react-redux-forms LocalForms component and have tied in redux devtools so that we can actually monitor the form state in development environments, but the result is that whenever a LocalForm is constructed it creates a new store in the dropdown. Certainly the creation of a new store is the intended effect, but we need a way to remove them from the devtools dropdown.

ZeroBeeOne avatar Jun 20 '17 06:06 ZeroBeeOne

Hi, Any updates here? I am facing the same issue.

aman-jain avatar Aug 19 '18 05:08 aman-jain

Hello. I stumbled upon this issue as in my application I have multiple sub-apps (one per tab) with option to remove a tab. Everything works nicely, they appear in the redux devools but they stay even thou I removed them... Is there any good way to tell redux devtools to remove "destroyed" store?

WitoTV avatar Feb 19 '19 13:02 WitoTV

@WitoTV anything you got here?

paschalidi avatar Sep 24 '19 15:09 paschalidi

@paschalidi sadly none. I have finished the project since then. I was not able to solve the issue. I decided to ignore that because of the strict deadlines for other things I had.

WitoTV avatar Sep 25 '19 09:09 WitoTV

I have a solution for this problem, but it requires a change to Redux. I don't see how Redux-Devtools can remove a listener from Redux without Redux first telling it to do so because there's currently no way for Redux to notify middleware to remove listeners and complete operations.

You can view my solution in this GitHub issue: https://github.com/reduxjs/redux/issues/3871

Sawtaytoes avatar Sep 01 '20 08:09 Sawtaytoes

I don't know if you've tried this, but I was able to successfully call window.__REDUX_DEVTOOLS_EXTENSION__.disconnect() to remove the listener from the Redux store.

While that seems fine and dandy, it doesn't actually remove the store. if you create another one (which connects the listener again), now you'll see two Redux stores.

Sawtaytoes avatar Sep 01 '20 09:09 Sawtaytoes

Hi, Any updates here? I am facing the same issue.

hiisea avatar Jan 19 '22 03:01 hiisea