-
I currently have a diagram setup to show data. On inital pageload it recieves data from 1 month in the past to current data and I have a datepicker setup to change the daterange. On change of the date range i use submit from useSubmit to make a new get request with the dates appended as params. In the loader function I get the dates and fetch the new data. I don't know why but useLoaderData wont revalidate my data now. It used to work thats the strange thing about it. I tried using useFetcher and even navigate but the data wont revalidate and state wont update. The loader data loads the new data, everything from the data fetching side is working fine but it wont update... Any ideas why? Is this intended? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Here's an example showing how https://codesandbox.io/s/remix-loader-submit-31248e?file=/app/routes/data.tsx |
Beta Was this translation helpful? Give feedback.
Here's an example showing how
useSubmit
is re-rendered with updated data. Let me know if you have any questions.https://codesandbox.io/s/remix-loader-submit-31248e?file=/app/routes/data.tsx