reedux
reedux copied to clipboard
Support deletion
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?
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.
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.