This document discusses new features in NGRX version 7, including breaking changes to ofType and selectors, new testing utilities like ProvideMockStore, and the introduction of meta reducers. Meta reducers allow preprocessing actions before normal reducers and act as middleware between actions and reducers. The document demonstrates building a meta reducer that syncs the store state with localStorage so the store rehydrates on app restart with the latest data from localStorage.
17. What are meta reducers?
MetaReducers are hooks into the action->reducer
pipeline. They allow us to pre-process actions
before normal reducers are invoked.
18. What are meta reducers?
MetaReducers are hooks into the action->reducer
pipeline. They allow us to pre-process actions
before normal reducers are invoked.
Or in other words:
“MetaReducers are Redux middleware “
23. App Objectives:
Create “User Preferences” which saves all
user choices:
Every user action will be saved to both client
store and localStorage
When re-starting the application - The store
sync with the latest state from the
localStorage