79697056

Date: 2025-07-10 12:37:51
Score: 3.5
Natty:
Report link

Can you share the component where you use the BuildProvider? It's probably in your App.js or a similar root component.

Ideally, it should be structured like this:

<BuildProvider>
  <BrowserRouter>
    <App />
  </BrowserRouter>
</BuildProvider>

If your BuildProvider is placed inside the BrowserRouter or even inside individual route components, it might be getting unmounted and remounted during navigation. That would cause your context to reset and potentially overwrite the localStorage with empty or default values, which are then reloaded as the new state.

Also, considering you're managing a lot of independent state values inside the provider, it might be worth looking into a more scalable state management solution like Zustand.

Reasons:
  • RegEx Blacklisted phrase (2.5): Can you share
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can you share the
  • Low reputation (1):
Posted by: Franco Moraes