How to be sure useLoaderData is called with fresh data? #11229
Unanswered
SylvainFaure
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi react-router community!
I started using the React Router v6 with an app bootstrapped with
create-react-app
a few month ago and I find it very nice and complete!However, dealing with a dashboard with many interactions and data updates I found some issues and I am not sure if I am using it the right way.
In particular I have a page where I cannot make it work with the flow I use, and I cannot reproduce it as a bug so I guess I am making something wrong.
The flow I use is:
The behavior is not consistent, sometimes it seems to work normally, but after one or two updates I have the same problem.
Simplified code of my loader:
I consume the results with
useLoaderData
like this:My question would simply be: what would cause my page not to be updated with fresh loader data while the loader is effectively triggered?
I am kind of lost on this one so any help would be precious,
Thank you,
Sylvain
Beta Was this translation helpful? Give feedback.
All reactions