error while using react-query prefetching and SSR in nextJs with Shadcn/ui
Hello, I'm creating a data-table component with shadcn/ui and I've noticed that when when I try to fetch the data and pass it to component It takes a little while to render, since the component takes a data prop of type <Stock[]>, but the data returned by the query adds an undefined type to it so I have to wait until Its successful then pass it to the component.
So I thought If of prefetching the query according to the docs to make it a little faster, but I get this error in the console and nothing changed pretty much.
Here is the code to the important files (since the post is too long I had to put in a file) and the error from the console:
the error:
So I thought If of prefetching the query according to the docs to make it a little faster, but I get this error in the console and nothing changed pretty much.
Here is the code to the important files (since the post is too long I had to put in a file) and the error from the console:
the error:
code_1.txt2.34KB