How to clear/reset a FeatureState #471
Replies: 1 comment
-
|
Have a public static readonly field on the class named Empty. Then dispatch an action that has a reducer to set the state back to empty. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there an idiomatic way to easily clear/reset/re-initialise a particular FeatureState? With that I mean re-creating the state object and informing any listener.
Of course, this can be done by creating an (empty) action and a corresponding reducer which just creates a new state. But this seems like a use case/pattern which is common enough I would expect library support for it.
Some cases when this would be useful:
Thanks in advance for any pointers.
Beta Was this translation helpful? Give feedback.
All reactions