Skip to content
Discussion options

You must be logged in to vote

it's because I was keeping initial data in react state and it kept it after route change keeping rendered same old data. Can you please comment on this? How to work with it?

I would not keep a state with the data from the loader/URL, but if for some reason you need to and you can't find a way to don't do it. You will have to run an effect to sync any change from the loader data/url back to your state, and ensure you don't overwrite unsaved changes done by the user.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tombohub
Comment options

@kiliman
Comment options

Answer selected by tombohub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants