Closed gajus closed 6 years ago
Hello @gajus, sorry for the delay, I didn't receive the notifications about issues.
Currently you cannot eject
a saga.
When you include a saga, it loads it from the web (code splitting), and register it in a registry.
The registry is only a key:value
object.
So ejecting it, would simply remove this entry.
Do you think it is really needed?
The code of the saga will still live in your ram client.
This is less about removing the saga and more about stopping it.
You are right, properly removing saga would require use of WeakMap to register sagas in the first place.
Meanwhile, start/ stop control can be implemented at the saga level.
I want to be able to inject saga when view mounts and eject it when view unmounts.
Is there a technical reason there is no method to eject a saga?