#both
1 messages · Page 1 of 1 (latest)
pretty much
you can also u se GET in react query to update stale data
so you don't have to rerender the whole page again
Its not uncomon to use Next.js with React Query to manage stale data
@red agate Yes, I could do that with React Query, but that would mean I'd only be using the client side, if I've understood correctly, given that React Query is used on the client side (if I'm not mistaken).
you can prerender the data and have some sort of initially SSR'd data and pass that data to the React Query's initialData prop
so its not purely CSR
its still integrated :)
although i agree that the RQ part is purely client-sided
@red agate good idea 🙂 so, for a concret example :
On my users page, I use SSR to fetch initial data (all users of my page 1, because I have a pagination). When I click on "edit", "create" or "delete", I use React Query and only Client Side Rendering ?
yes
you can use server side rendering, i.e returning HTML in server-action™️ but thats extremely experimental
or i.e if you are finished with Edit or Create and wish to redirect to another page, you can use server side rendering
but if you wish to stay in a page, its better to use RQ
@red agate Thank you so much 🙏 so if "edit" is a new page, it's better to use client side to get the user to edit ? Or server side ? Sorry 😅