Next 13.4 problem with loading state after content is visible & hydration problem
Hey, I have a small app with Next 13.4 with Shadcn Ui 😍 it's really really good.
But I'm also using XState with a provider that I init on my
layout.tsx
file because I save and read the machine from a DB (don't ask why I'm just trying things).
As you can see on the video, when I navigate, the content is first shown with the right data, AND AFTER, the loading state from loading.tsx
is shown...
And I have an hydration problem... I fixed it with a dynamic import but it feels wrong. I'm using the "use client"
directive on my page and layout. I found this article but it didn't help me much...
https://nextjs.org/docs/messages/react-hydration-error
Another question : How to get data from a server component and "add it" to react query as initial data ? 🧐0 Replies