You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I'm sorry if this is not the right place to ask, feel free to close this and tell me where to ask.
I have a question about how state persistence is handled in this app.
I noticed that the state is first loaded into a variable (_state) and then accessed using persisted.get() to initialize React state variables in multiple providers. I understand that this approach ensures the state is available when needed, thanks to initPersistedState() delaying the app render.
However, wouldn't this mean that the state is effectively stored twice in memory—once in _state and once in React state—leading to unnecessary memory usage? Or is there an optimization that prevents this duplication?
Thanks in advance for any clarification!
The text was updated successfully, but these errors were encountered:
Hi guys, I'm sorry if this is not the right place to ask, feel free to close this and tell me where to ask.
I have a question about how state persistence is handled in this app.
I noticed that the state is first loaded into a variable (_state) and then accessed using persisted.get() to initialize React state variables in multiple providers. I understand that this approach ensures the state is available when needed, thanks to initPersistedState() delaying the app render.
However, wouldn't this mean that the state is effectively stored twice in memory—once in _state and once in React state—leading to unnecessary memory usage? Or is there an optimization that prevents this duplication?
Thanks in advance for any clarification!
The text was updated successfully, but these errors were encountered: