reedux icon indicating copy to clipboard operation
reedux copied to clipboard

Support deletion

Open pke opened this issue 6 years ago • 2 comments

You mentioned into the readme that removing of stores is not supported yet. Do you think it would be difficult to add this? Or does weakmap not support removal of entries?

pke avatar Apr 11 '18 18:04 pke

Not a WeakMap issue, but it would be a bit tricky to add this

We rely on replaceReducer from the supplied store instance to add new paths to that store, as well as preserving the reducer of the existing app. To delete registered reducers/actions we would have to emulate replaceReducer so that the same functionality is preserved and that store paths get removed altogether (not set to undefined).

I can have a go at it later on when there's a bit more bandwidth here.

Silviu-Marian avatar Apr 11 '18 19:04 Silviu-Marian

Thanks for clearing this up, maybe we can raise this over at the redux repo to ask them for an easy way to remove reducers. But I understand that is against their "time travel" policy, which requires the reducers in the system to stay constant.

pke avatar Apr 20 '18 15:04 pke