How To Use React Query with Next.js App Router

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

watched 5 hrs. videos so far, and you 10 min video finally made able to do it, thank you

ilrzkxe
Автор

Thanks! Exactly what I was looking for.

aingaran_com
Автор

Thank you very much, was looking for this for a while

bm
Автор

If you are building a NextJS application then you should consider server side fetching as the default choice.

gravellife
Автор

i've dismiss point of view, so why do we need SSR if you showing how to fetch data on client side. Better to show how to cache date in between SSR hydration

mnicctd
Автор

Thanks for the video. It is very helpful. Just a minor tip (you probably know it already); you can use CMD + TAB to switch back and forth between apps instead of using Raycast

rayaffas
Автор

it's really i cool video to implement react-query with NextJS, but know you're treating NextJS kinda like react without any need for server components, or maybe you can still use it
for a small small portion in your app
what if i want to fetch the todos from the server component and pass it to a client component and when the client edit or add a new todo i need this data which's coming from server to revalidate ??
it would be better i guess to wait an update for react-query to handle nextjs server components

MaybeBLTZ
Автор

Bro this has saved me quite some pain <3

jeffrey
Автор

thanks for this, it solved my issue :)

nosairabor
Автор

Do you have a video that explains how to use Tanstack for SSR?

nghiepnguyen-fi
Автор

you explained very good. I subscribed :)

senatoriving
Автор

Thanks for the video, I run into the same error and was having a hard time solving it, untill I found this video! I have a question though, I am thinking of implementing React Query to get rid of my useEffects, but in order to do the fetching, I need to pass a user ID to the function and to do that, I need to wait for the session to load (I am using Next Auth). So at the beggining, I dont have the user ID, so again I am falling back in the useEffect to run the Query when the session is populated. Any suggestions on this? Thanks in advance!

rodrigomarsan
Автор

isLoading || !data is this expression necessary? As far as I know isLoading is false as soon as data is fetched.

pizzaitaliana
Автор

is there a correct folder structure to put this provider or this way you made is already a good guideline?

bmielki
Автор

But you will always be fetching on the client side? Not sure of the benefit of reactquery with the new next .js

heguer
Автор

have a question on this. what are the benefits of using react query at the first place? is it for 'use client' (not 'use server') in next js?

hasifzulkifli
Автор

01:57 what is this vscode extension for drop-down menu to quickly import

GUTEA
Автор

am i correct?
even though we are technically wrapping your entire app with a client component.
if there are any ssr components down below in the tree.
they will be rendered as server component and then hydrated on the client side.

mohammedmehdi
Автор

Hello can we use axios too and make post delete or any other requests here?

milanpoudel
Автор

Would you still be able to use server components and top level async this way? Since its wrapped with use client?

favouritejome
join shbcf.ru