SolidStart with TanStack Query causing hydration error
I have an almost barebone SolidStart project that was init using
npm init solid@latest
and selected tailwindcss and TS during setup
I am trying to fetch some data using TanStack Query but i keep running into hydration error
My index.tsx
and my get-messages.tsx
file
and the hydration error i get:
The hydration error goes away if i add 500ms delay in getUserMessages()
I feel like i am misunderstanding something very fundamental so i would appreciate any kind of pointers 😅1 Reply
Fixed!
Turns out it was some npm bug maybe?
The correct code was supposed to be
Instead of
which is how i was doing it originally but that was just straight up crashing my server, but after running
npm update
the issue was fixed 😅