React Query with Next.js App Router

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


## Chapters
00:00 Intro
01:45 Install the required dependencies
02:30 Create a React Query client provider in the root layout
04:30 Set up a client component for the query client provider
07:37 Create a Supabase client
10:55 Set up the environment variables
11:54 Create database types from a remote project
13:15 Import the types and provide them to the client
14:24 Create a hook to fetch data
15:30 Organizing queries in a query folder
19:50 Construct the React Query from supabase-js query
23:44 Make env variables available in client components
24:28 Create Row Level security policy
Рекомендации по теме
Комментарии
Автор

This and the next video is what I have been looking for

oamarkanji
Автор

Using T3 stack with supabase & drizzle, It's nice

nikhilpsathyanathan
Автор

It's a great video. Thanks a lot! ❤

vudlvnl
Автор

Thanks so much for this, I have it working for my project, though I have not fully grokked everything. i was wondering if it is possible to redirect from the countries/[id] page if the user is not authenticated, have not been able to get this to work, yet.

derekjwilliams
Автор

you can press F2 key to rename the function/variable name :D

davidkhierl
Автор

Cool video, thanks! However I thought nextjs has builtin caching mechanisms itself. Why would you need tanstack query if you can specify what you want to cache/revalidate just with nextjs?

filipesommer
Автор

Isn’t that making your entire project as a CSR instead of SSR at 4:45? If so, you will loose all of the benefit using Next.js

deanelie
Автор

you wrapped everything with client component and now whole webside is client side rendered pages, but i need some ssr pages

dear_up
Автор

Just a small tip, or critique for the future. You cadence is very annoying most of the time. Try to be more engaging instead of speaking like you don't even know what's going on, even if I know you do. Awesome video tho, helped me a lot to setup the reactQuery in NextJS

rooba_web