Replies: 2 comments 4 replies
-
See #2668 (comment) |
Beta Was this translation helpful? Give feedback.
4 replies
-
@TeosVerdi seems like you need to persist the data outside of your app because I think you are setting the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I can't seem to find a way to set initial checkbox state from MobX store after a refresh from Next.js. As soon as i refresh the page, it renders with the state i set before.
For example: i check the checkbox (which has the checked/onChange routed to MobX) -> Page refresh -> The input persists to be checked, while the state is set to false.
I've tried all the other ways to pass the observer HOC (Observer, useObserver), disabling hydration, reworking store, but to no avail.
Versions
Here's the code:
store/ThemeStore.ts
pages/index.tsx
stores/index.tsx
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions