question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Saving nested state selectively (infinite depth)

See original GitHub issue

In 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:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
bdspencommented, Apr 10, 2020

Sounds good. I’ll see if I can whip up a few examples when I have time.

0reactions
BBlackwocommented, Oct 10, 2020

🎉 This issue is resolved in version 10.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found