-
Hello, My app is spitting hydration errors every second. I have 2.5K errors per hour. These are the error types:
So, my app is running client side without any SSR. The only thing I can think of that could be causing the problem is that in the loader the fetch of resources never returns the same data twice. Its a highly concurrent application that aggregates tons of data and I cannot guarantee that the same GET request returns the same JSON response. Every server response is different. I am using no Chrome extensions. My questions are:
Anyway, at this point I am clueless and thinking about switching the framework before it's too late, i.e. the app gets bigger and the problems gets bigger. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I guess your users are visit your app, and maybe they are using Chrome extension.
can you reproduce the error in local dev? Then maybe you can get more detailed error message.
that's the process of hydration. You can remove the |
Beta Was this translation helpful? Give feedback.
-
This is not what the error means, the error means that instead of hydrating the HTML generated during SSR what React will do is to render the app and throw away the HTML, here the difference is that hydrating just run effects and attach event listeners, while the other process is generating the DOM again. You still have SSR, but it will take a few ms more to finish the hydration/rendering process.
This can't happen, because when React hydrates the app client-side the loaders are not being fetched again, instead Remix sends the data it got from the loader during SSR in the HTML and use it during the hydration, so it's always the same data. What could be happening is dates being parsed with a different timezone during SSR and CSR for example. |
Beta Was this translation helpful? Give feedback.
-
and its possible that this error caused by third-party framework |
Beta Was this translation helpful? Give feedback.
This is not what the error means, the error means that instead of hydrating the HTML generated during SSR what React will do is to render the app and throw away the HTML, here the difference is that hydrating just run effects and attach event listeners, while the other process is generating the DOM again.
You still have SSR, but it will take a few ms more to finish the hydration/rendering process.