Tim DeschryverTim

Flush state with an NgRx meta-reducer

The NgRx logoThe Angular logo
@tim_deschryver

Flush state with an NgRx meta-reducer

Use case

You want to (partially) flush the state.

Solution

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.

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
Support the blog Share on Twitter Discuss on Twitter Edit on GitHub