Saving nested state selectively (infinite depth)
See original GitHub issueIn the LocalStorageConfig
, when using the keys
configuration property the property “app” will not be saved in the local storage at all, only the deal
property in clear
and the auth
top level property.
Is this a problem with having the state nested too deeply? Or is my syntax wrong?
keys: [
{
clear: [
{
app: [
"vehicles",
"vehicle",
"searchString",
"writeupListLength",
"selectedManagerId",
"financing",
"globalSettings",
"dealer",
"links",
"deals",
"newResiduals",
"certUsedResiduals"
],
},
"deal"
]
},
"auth"
]
Using chrome on mac.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
How to save state in a deep nested object? - Stack Overflow
One solution is to manually spread every layer of object like so. this.setState((prevState) => ({ users: { ..
Read more >Why is it so difficult to modify a deeply nested state in React?
There are two main ways to deal with the problem of updating a deeply nested state. First is flattening your state to avoid...
Read more >Use nested fields - Flowfinity
Nested fields in Flowfinity enable you to logically group related or repeating ... down into each item selectively when you are ready to...
Read more >Deeply Nested Objects and Redux | Pluralsight
For a property update of a deeply nested object to be rendered, the high-level reference needs to be changed. That is, a deep...
Read more >Mongoose v6.8.1: Query Population
Saving Refs; Population; Checking Whether a Field is Populated; Setting Populated Fields; What If There's No Foreign Document?
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
Sounds good. I’ll see if I can whip up a few examples when I have time.
🎉 This issue is resolved in version 10.1.0 🎉
The release is available on:
Your semantic-release bot 📦🚀