FAQ | This is a LIVE service | Changelog

Skip to content

reset all application state on logout

Dr Rich Wareham requested to merge github/fork/rjw57/issue-74 into master

LOGOUT is a special action in that potentially all state cached by the application becomes invalid.

Wrap the default reducer in an implementation which resets state by calling the reducers with undefined as the current state. Reducers are given a change to "save" something from the original state since it is added to the LOGOUT action as an originalState property but a "naive" reducer will just return the initial state for the application.

Closes #74 (closed)

Merge request reports

Loading