GitHub package.json versionTypeScriptNPM
GitHub package.json versionTypeScriptNPM
Latest

channel.resetState Usage

Note: The following is also wholly applicable to global store.resetState

Signature:

(propertyPaths?: Array<string>) => void;

What does the channel resetState method do?

Resets slices of state to their initial state values as desired.

Accepts an array of property paths referencing the desired slices of state to reset.

Performs a total state reset when @@STATE is present in the property paths array.

Resets only state slices referenced by this channel's selectorMap property when invoked with 0 arguments.

Performs a total state reset when invoked with 0 arguments and @@STATE is present in the channel's selectorMap.

Performs no state reset when invoked with 0 arguments on a channel with no selectorMap.