Setup for config in persistState
See original GitHub issueHi, I’m struggling to figure out how to select a subset of what config
needs to look like with keys/values inside of persistState
. There are code snippets but it’s a little difficult to piece them together and figure out what is needed to just select a subset of fields to sync to localStorage
. Would you be able to elaborate more on how to accomplish this? My state currently looks like below.
{
key1: {},
key2: {
innerKey1: [],
innerKey2: [],
innerKey3: null
}
}
If I wanted to select innerKey1
here, how would I go about that?
// Pseudocode
compose(
applyMiddleware(thunk),
persistState('key2', /* config_to_access_innerKey1 */)
);
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Persist state with Redux Persist using Redux Toolkit in React
Setting up React; Persisting state with Redux Persist; Nested persists using Redux Persist; Specify how the incoming state is merged ...
Read more >Persist State | Elf | A Reactive Store with Magical Powers
The persistState() function gives you the ability to persist some of the app's state, by saving it to localStorage/sessionStorage or anything that implements ......
Read more >Persist state - Guriddo jqGrid JS
The Guriddo jqGrid exposes the capability to save and restore settings that were previously applied to its structure using the $.jgrid.saveState and $.jgrid....
Read more >How to configure redux-persist with redux-toolkit?
I have configured redux-persist with a traditional react-redux setup like this: onst persistConfig = { ...
Read more >The Definitive Guide to Redux Persist - React Native Coach
The blacklist is added into the config object that we used when setting up our PersistReducer . const persistConfig = { key: 'root',...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s how it needs to be done.
Any one is getting
TypeError: Object(...) is not a function