docs: Add suggestions about getInitialState on persist
Cadienvan opened this issue · comments
Michael Di Prisco commented
The persist
middleware alters the behavior of getInitialState
because of internal reasons mentioned in #2277.
When following the documentation here while having a persisted state accompanied by a non-persisted one, the suggestion about getInitialState in the vite's afterEach
lifecycle method isn't applicable.
Our service slice is persisted, while the remaining 3 aren't, so our getInitialState
will only contain the createServiceSlice
slice of the state.
I'd love to mention it in a PR if you have any idea about how to properly handle this.