In namely/frontend, it is somewhat common to reset store properties to their default value in setup operations. For example:
dispatch(setError(null));
For collection stores we can just call the provided clear action but it'd be nice if there was also a reset action for simple stores that just sets the value to the defaultValue. For example:
const {
set: setError,
reset: resetError,
reducer: validationErrors,
} = simpleStore('ui/error', { defaultValue: null });
In namely/frontend, it is somewhat common to reset store properties to their default value in
setupoperations. For example:For collection stores we can just call the provided
clearaction but it'd be nice if there was also aresetaction for simple stores that just sets the value to thedefaultValue. For example: