hydration mismatch when wrapping component in a suspense
I am trying to render a loading ui when data is being collected on the server:
For context this is routeData that i defined on the parent route:
Observation:
1. When i put a delay of 5 seconds, and reload the page, a GET request is sent to the server the page will show that it's loading for 5 seconds
2. Once the 5 seconds is up, a POST request is sent to that page's routeData, then it loads for another 5 seconds.
3. This is the time when the error below appears. The suspense will now also show the loading fallback.
4. Once the 5 seconds is up, then the page now shows the correct data.
TLDR, i have two questions:
- why is there a total delay of 10 seconds to load the data in when i only put a delay of 5 seconds
- why is there a hydration mismatch error
1 Reply
bump
Hmmm, i think i might have caused a refetch because i click dismiss the error, however, do you know what might have caused the hydration error? @Toka