Flush state with an NgRx meta-reducer

Tim Deschryver

Flush state with an NgRx meta-reducer link

Use case link

You want to (partially) flush the state.

Solution link

Use a meta-reducer to listen to an action and flush the state by invoking the reducer with the undefined state so the reducers re-use their initial state.

Feel free to update this blog post on GitHub, thanks in advance!

Join My Newsletter (WIP)

Join my weekly newsletter to receive my latest blog posts and bits, directly in your inbox.

Support me

I appreciate it if you would support me if have you enjoyed this post and found it useful, thank you in advance.

Buy Me a Coffee at ko-fi.com PayPal logo

Share this post on

Twitter LinkedIn