react-async-states icon indicating copy to clipboard operation
react-async-states copied to clipboard

Transcient configuration

Open incepter opened this issue 2 years ago • 1 comments

Allow removing async states after all subscribers unsubscribe

Actual behavior:

Actually no instance gets removed from the pool once it's created;

Expected behavior:

To be able to declare instances that they will get immediately removed after being released, such when using them inside react components, I should be able to tune whether the state stays after my components unmounts, or to stay there for future usage. Actually, this is done via resetStateOnDispose, but it only resets the actual state, it does not remove the instance.

incepter avatar Mar 06 '23 13:03 incepter

Anonymous instances get removed automatically, another flag will be used to detach it from the context when all subscribers unsubscribe

incepter avatar Jan 07 '24 22:01 incepter