State management with Zustand and Inertia Partial Reload conflicts (maybe) #1949
Unanswered
samuelhgf
asked this question in
Help (React)
Replies: 1 comment 1 reply
-
I have same issue |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, guys! I'm working in a project that is using Inertia and Zustand for state management.
I'm facing an issue when using partial reloads from Inertia after I changed the prop state with Zustand.
For example:
Let's say I have a
foo
prop coming from backend as null. I do some process and the prop change tofoo = bar
at the state management and also at the backend. When I call the router.reload with partial pointing to other props, thatfoo
prop change its value to null, the same as the first value when loaded the page. The fix, for now, is to also pass the prop into the partial reload as well.This is just one example, and it's happening for a lot of props in the page, and we don't would like to reload all props all the time, since we already have the value of them in the front-end.
Would like if someone already faced something similar.
Beta Was this translation helpful? Give feedback.
All reactions