mrpmorris / Fluxor

Fluxor is a zero boilerplate Flux/Redux library for Microsoft .NET and Blazor.
MIT License
1.24k stars 141 forks source link

Consider adding StoreDisposingAction #310

Closed diegofrata closed 2 years ago

diegofrata commented 2 years ago

I am using effects to subscribe to Observables, but when a circuit is being closed in Blazor Server and the store is being disposed, there's no built in action to represent this event. I think it would be useful as it would give developers an opportunity to deterministic clean-up any resources or execute some final side effects.

mrpmorris commented 2 years ago

Shouldn't that be done in the circuit? After all, the circuit ultimately has to notify the store the user is gone.

diegofrata commented 2 years ago

You're right, I managed to accomplish it using a circuit handler. I will close this issue.