Learn React Query In 50 Minutes

  Рет қаралды 323,642

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Пікірлер: 260
@be2wa
@be2wa 2 жыл бұрын
I have not even watched till the end yet, but I can already say that for a react query crash course, this is probably the most comprehensive and useful one I have seen on YT.
@ashtarpaniagua4732
@ashtarpaniagua4732 Жыл бұрын
This is an incredible crash course. Great job! Also, I'm blown away by how well designed tanstack query seems to be. They seem to have thought of 99% of use cases at first glance. 👏
@rod6722
@rod6722 2 жыл бұрын
Right when I needed it. This guy has superpowers!
@ScienceDayYT
@ScienceDayYT 2 жыл бұрын
I literally was looking for a react query tutorial last night. This is amazing! Thank you!
@alanthomasgramont
@alanthomasgramont 2 жыл бұрын
We replaced all of our reliance on Redux with using react-query in a recent app. The query store is accessible everywhere within the provider, and its easy to requery, update, etc., including manually updating locally when you say add a row so you don't have to pull the whole state down again to get the update. Plus, my favorite part is that data gets stale and goes away, something Redux does not handle. Finally, it has async built in, so you don't need some third-party hack to make async calls and do double actions just to update state. You do the call, state gets updated later, renders happen, everyone is happy.
@piyushaggarwal5207
@piyushaggarwal5207 2 жыл бұрын
Redux.... Toolkit Query ?
@alanthomasgramont
@alanthomasgramont 2 жыл бұрын
@@piyushaggarwal5207 Redux toolkit is better but react-query is better IMO
@Peter-yd2ok
@Peter-yd2ok 2 жыл бұрын
Does it work well with SSR in Nextjs?
@alanthomasgramont
@alanthomasgramont 2 жыл бұрын
@@Peter-yd2ok I couldn’t answer that. I’m only starting to learn NextJS right now.
@Peter-yd2ok
@Peter-yd2ok 2 жыл бұрын
@@alanthomasgramont i see.
@Tyrone-Ward
@Tyrone-Ward 2 жыл бұрын
Thank you for this. I don’t know why, but your video was way easier to understand than React Query’s documentation.
@johnconnor9787
@johnconnor9787 Жыл бұрын
24:40 Chaining queries - done with "enabled" property, which is a boolean or an expression that returns boolean 36:28 The invalidation invalidates all queries starting with a certain key. In order to invalidate the exact query - the second parameter should be used {exact: true} 37:10 Manually put the data to cache when creating a new, so that it presents even before it is refetched from a backend. Provides better user experience
@chrisstucker1813
@chrisstucker1813 Жыл бұрын
Thanks John Connor. Now get back to fighting skynet
@Bert1986
@Bert1986 7 ай бұрын
After 4 months as a intern, first project on the job. Using React-Query, and a new stack... 2 stressfull days... Found this. Showed me so much, so clear, sort of clearing my imposter syndrome on the spot 😂
@CozyPads
@CozyPads 8 ай бұрын
Not one for commenting, but this beats every other video I've seen on React Query. Great job.
@iJavaScript
@iJavaScript Жыл бұрын
That's a great tutorial! I love it! It'd be even better if you share your notion notes, so we can reference them as well.
@faithogunlaja4497
@faithogunlaja4497 2 жыл бұрын
And by the way, thanks Kyle, you just have ways of reading my mind, you're amazing!! Everything I want to learn you put on the table. I was just thinking of tRPC and almost immediately, I see a notification 😂😂. You're just too good. ♥️
@mehmoodulhassan4042
@mehmoodulhassan4042 3 ай бұрын
Its litterally the most comprehensive video in such a short span of time....Thanks sir
@khoinguyen-ft2ys
@khoinguyen-ft2ys 2 жыл бұрын
You have everything about calling api + state management just by using React query. Thanks Kyle for your very detailed video about React query.
@petropzqi
@petropzqi 2 жыл бұрын
I'm a backend developer. I like to get up to speed on whats happening on the other "side". I must say you did a great job with this video. One of your best so far. Very interesting. Thank you.
@sarbjotsingh9998
@sarbjotsingh9998 2 жыл бұрын
HELLO FROM THE OTHER SIDE
@emenikedaniel
@emenikedaniel Жыл бұрын
@@sarbjotsingh9998 😂 welcome to our world
@nicholasroman8071
@nicholasroman8071 10 ай бұрын
Thank you for your tutorials they have benefited me immensely. Right now, I am working on using reactQuery in conjunction with authentication. The samples you have gone over have benefited me a lot especially your presentation on hooks.
@rael_gc
@rael_gc Жыл бұрын
Awesome!
@WebDevSimplified
@WebDevSimplified 11 ай бұрын
Thanks!
@joshuagalit6936
@joshuagalit6936 Жыл бұрын
I watched it all because I've applied it in my current project 💯💯💯
@JesseSlomowitz
@JesseSlomowitz 2 жыл бұрын
So happy to see the React Query crash course; I've learned some new things here even with the months I've implemented it into my projects. It's also great that TanStack has made this type of library for other things like Svelte. Been learning how to implement React Query with Preact Signals to utilize global props and cut down on VDOM to improve React projects. One thing to note is that the obj passed in for the query function has a signal property (an AbortController) which, while excused as not necessary in this video, is essential for any API fetching used to cancel fetch requests if a user changes mid-fetching. This is a great crash course and hoping to see other things like Preact Signals or even Bun talked about soon.
@developerpranav
@developerpranav Жыл бұрын
🤩 I never build a project without react query anymore. usually with trpc, or with server actions in nextjs!
@JOJOMANGO99
@JOJOMANGO99 4 ай бұрын
Thanks for sharing some important and common usage of react query, it's really clear and helpful for react-query newbie like me!
@2347matte
@2347matte Жыл бұрын
React Query is one of the most consequential additions to the React ecosystem since the beginning. For the first time ever, we can actually separate client state management from server state management and achieve (almost) true separation of concerns. UseQuery and useMutations are kinda like the equivalent of $.get and $.post for JQuery, they allow a service layer to be decoupled from React components. Thus, React being a UI library can be left to what it does best: DOM rendering.
@CreativeB34ST
@CreativeB34ST Жыл бұрын
I wish you would have covered the scenario where you have a list of items with different kind of filters like search fields or dropdowns. When a user interacts with a filter and changes its value, it needs to refetch the list with the values of the filters reflected in the fetch request as query parameters. A little bit like the pagination system but more flexible for custom values. That's a common use case and I wonder if React Query has a built-in solution for this. Would love to get your take on this. Great video nevertheless!
@lexsemenenko
@lexsemenenko 2 жыл бұрын
This is the perfect example of a technology explanation. The ideal length for its depth.
@Sumaila2000
@Sumaila2000 Жыл бұрын
I love this guy 😁. You make me a better developer and your tutorials are quick and easy to follow.
@leebobtheblob87
@leebobtheblob87 Жыл бұрын
8:35 using isLoading and isError before ui rendering logic with successful fetch 10:30 saving useMutation as variable to use later 10:54 new entry not being displayed because of cache 13:11 upon successful mutation -> useQueryClient to invalidate query (with query key)-> re-fetch 16:07 querykey needs to unique for idnetification 23:20 changing default staletime ( fetching only happens when data is stale ( 24:59 conditional query : using enabled. Query runs only when specific key exists Continue watching from useMutate
@yordanov5.0
@yordanov5.0 Жыл бұрын
Man you deserve a Noble award! Thank you so much!
@srinivasnahak3473
@srinivasnahak3473 Жыл бұрын
This is the best tutorial by far. I've learned everything I need to know.
@Aaronmoreno
@Aaronmoreno 2 жыл бұрын
crazy, I was just looking up resources for react query and this popped up. Perfect timing
@hunterbidenafterlife
@hunterbidenafterlife 2 жыл бұрын
awesome! please please please please do an in-depth crash course of React-Hook-Form
@arnabchatterjee8556
@arnabchatterjee8556 2 жыл бұрын
I built a whole platform using react query. I didn't have to write a single use effect. It's great actually.
@sachinsainni
@sachinsainni 8 ай бұрын
Kyle, you have a great tutor. and thanks for this show. 🙃
@Jaracara11
@Jaracara11 Жыл бұрын
ReactQuery is awesome! Basically solves all the issues I have with React in a simpler way.
@mouhibsahloul2577
@mouhibsahloul2577 2 жыл бұрын
What a great tutorial, I. was planning to learn it for react native and here we go
@omaracelys3217
@omaracelys3217 Жыл бұрын
Bunch of infos, Thank you ! One advice : try to make a playlist and make it to smaller chunk , i guess you can more views this way and it will be eaiser to use it as reference and come back (also will lead to more views)
@patrickjreid
@patrickjreid 2 жыл бұрын
Love your videos, I would like to suggest that in the future you leave in the lines numbers... it makes taking notes easier.
@case6339
@case6339 Жыл бұрын
Thanks for this tutorial. It was just the right amount of info with the right length.
@garudkardnyaneshwar3426
@garudkardnyaneshwar3426 Жыл бұрын
Best video ever related to react query ❤❤
@patrykpuciennik7950
@patrykpuciennik7950 Жыл бұрын
I just keep and keep watching you. This is an amazing piece of work you're doing. It really helps various types of devs to leverage the knowledge from your courses / crash courses. Thanks for your hard work I am really amazed by the content quality. Best of luck in the future WDS!
@orarbel167
@orarbel167 2 жыл бұрын
Great tutorial! Thanks Kyle 🙏🏽
@sushieatingcobra
@sushieatingcobra Жыл бұрын
amazing thanks for such an incredible crash course
@theouterspace5285
@theouterspace5285 Жыл бұрын
Thanks Kyle, this is gold. " Nice ka bai" 😁
@davithchhung7577
@davithchhung7577 2 жыл бұрын
Redux RTK query does same thing and it's also good combo if we use Redux Toolkit for state management. Otherwise, React Query is perfectly fine to work with any other state management libraries. It's also really good to create custom hooks for react-query like usePosts, useCommends, ...etc.
@damianszymczuk7796
@damianszymczuk7796 2 жыл бұрын
I agree. If your application does not need state, react query looks good. But if you need global state, redux is a better choice.
@jsceo
@jsceo 2 жыл бұрын
@@damianszymczuk7796 zustand is better choice :)
@parnasmi
@parnasmi 2 жыл бұрын
@@jsceo , there is not better choice ever. It depends on the project and your preferences. Though, Zustand is good choice indeed.
@himanshujagdale4966
@himanshujagdale4966 2 жыл бұрын
@@parnasmi I am new to React, can you please explain why we need state management libraries like zustand and redux if we already have useContext hook?
@ItsPureLuck27
@ItsPureLuck27 2 жыл бұрын
@@himanshujagdale4966 I’m wondering this same thing too after just learning useReducer
@danielrondongarcia9905
@danielrondongarcia9905 Жыл бұрын
Excellent video! As always! thank you for sharing your knowledge.
@spencer5051
@spencer5051 2 жыл бұрын
RQ is great! I watched your video on xstate from a few days ago and I was thinking how a wrapper around RQ (or a custom hook) would be just as good / better.
@NZY1990
@NZY1990 Жыл бұрын
I can like his videos without watching them. I love you KYLE
@RizaHariati
@RizaHariati Жыл бұрын
Great tutorial. But you must have good solid basic React and fetching to be able to follow this. So fast, you won't get bored. You will get super dizzy, but won't be bored. Thank you! 😂😂😂❤
@etinosaizekor6533
@etinosaizekor6533 4 ай бұрын
Great explanation! Very useful. Thank you.
@bhatrasim
@bhatrasim Ай бұрын
good work mate it really helped
@amershboul9107
@amershboul9107 Жыл бұрын
the most amazing video about react query ✨
@Morimove
@Morimove 7 ай бұрын
it would be greate if you provide whole code in every video. btw loves to watch your videos
@vasyaqwe2087
@vasyaqwe2087 2 жыл бұрын
Thank you, videos like these are crazy helpful. You're the best!
@JacobDuenke
@JacobDuenke 2 жыл бұрын
Hey amazing video as always. This one is a cut above. Thanks Kyle!
@jpisty
@jpisty 2 жыл бұрын
Perfect timing for this tutorial. Thank you thank you thank you!
@samandarboymurodov8941
@samandarboymurodov8941 Жыл бұрын
Such a useful tutorial. Thank you Kyle a lot!
@riveto_ir
@riveto_ir Жыл бұрын
Just like a pro! thanks alot!! 🤩😍😇
@TechX5others
@TechX5others 2 жыл бұрын
thanks a lot. was waiting for you for this
@morteza7298
@morteza7298 Жыл бұрын
Ty so much for this amazing crash course
@yessay9382
@yessay9382 Жыл бұрын
You just save my day! Many thanks
@hakangundogdu
@hakangundogdu Жыл бұрын
Thank you very much Kyle, I learn a lot from you.
@TheAzovStar
@TheAzovStar Жыл бұрын
Very good information. Short, fast and useful.
@oliverhughes169
@oliverhughes169 2 жыл бұрын
This is an awesome tutorial, well done and thank you!
@vonderklaas
@vonderklaas 2 жыл бұрын
Kyle, also a suggestion, for enabled option when we fetching users For me, this approach -> "enabled: !!postQuery?.data?.userId", worked much better than "!== null" comparision Cause, for some reason, React Query still made a request to API, but instead of userId, for a minute there was "undefined", so looks like that null check didn't worked for me Cheers!
@PJ-od9ev
@PJ-od9ev Жыл бұрын
Thanks for the great content. Please teach how to put the data from useInfiniteQuery to a state so we can use it fluently in a react component.
@luciusartoriusdante
@luciusartoriusdante 2 жыл бұрын
I know what I'll be doing this weekend. Thank you!
@vishalkole9111
@vishalkole9111 6 ай бұрын
Great Tutorial!
@elena-la-coreanita
@elena-la-coreanita Жыл бұрын
Thank you for the tutorial! I've learned a lot.
@g-ytub
@g-ytub 11 ай бұрын
Extremely useful. Thank you very much.
@elwan-l1
@elwan-l1 2 жыл бұрын
I just start using react-query for work this morning, it's fcking amazing
@bishalchhetri8817
@bishalchhetri8817 2 жыл бұрын
Wow finally I understand the concept 😍😍
@talhasifat15
@talhasifat15 Жыл бұрын
39:23 Pagination Version 5 is not using isPreviousData and keepPreviousData instead import keepPreviousData from react-query. alter to isPreviousData use isPlaceholderData and to keepPreviousData use placeholderData: keepPreviousData (the function you import earlier).
@rhandytabriantama
@rhandytabriantama Жыл бұрын
Do you have a code sample?
@skie20
@skie20 6 ай бұрын
this video is just gem
@richardmccormack2486
@richardmccormack2486 Жыл бұрын
Excellent, succinct content 🤘
@vickylance
@vickylance 10 ай бұрын
Can you share with us the notion notes that you took for react query? That would be very helpful
@geforcesong
@geforcesong 2 жыл бұрын
excellent tutorial, thanks Kyle
@massimopa
@massimopa 2 жыл бұрын
Are the Notion's note shown at the beginning (and maybe the notes of other topics) available somewhere? It would be so nice to have them in a public Notion webpage as a quick reference when someone just need to remember some details and not rewatch the whole thing!
@sheratrium
@sheratrium 2 жыл бұрын
++
@PM-4564
@PM-4564 2 жыл бұрын
For web apps that have files dedicated to business logic that need access to data from the database, RTK query seems more appealing because I assume you could access the query results without a React hook (using Redux-only). Whereas for React Query, it seems like it was designed to only be used inside React components themselves, which doesn't go well with having a business logic files that power your React components,.
@DarkzarichV2
@DarkzarichV2 2 жыл бұрын
Just want to correct you on that one, you can use your query client outside of react context and then get the data using your queryKey. Just need to export that QueryClient instance There is Theo T3 video about state in React and he assures you TanStack Query is all you need for so called server state and for client state you can use something less bloated like maybe jotai is just enough for you and it's much simpler than RTK
@parnasmi
@parnasmi 2 жыл бұрын
@@DarkzarichV2 Even without react-query using Redux and redux saga I separated the server state and app state into two global states. For server state I used Redux and for app state I used context. Now I am using Next, Prisma, Jotai combination for all that
@TheStallion1319
@TheStallion1319 Ай бұрын
Amazing 💙
@HighTechPlus
@HighTechPlus 2 жыл бұрын
Thank you so much for these tutorials Hope you'll make a tuto about Redux toolkit Thanks
@ziayamin339
@ziayamin339 Жыл бұрын
Please make a tutorial on how to use react-query with nextjs (SSR)
@pensums
@pensums 2 жыл бұрын
Thanks for this awesome tutorial, I have yet to use it in my personal projects and I'm eager to give it a try. But I have a more or less related question. Is there an advantage of using useRef hooks with the inputs inside a form? Can't you just get the values from the event instead? Basically you already have the inputs data in that event so imo there shouldn't be a reason to create refs for the same inputs data. Also let's say you had 10 inputs in your form, that would be very cumbersome to have 10 refs.
@abhaykumarsingh3884
@abhaykumarsingh3884 Жыл бұрын
you should also show us an api that you used for fetching ,without this it is very difficult to understand infinite scroll type stuffs
@graficandorealidades7561
@graficandorealidades7561 2 жыл бұрын
My bro Kyle is reading people's mind at this point
@danielChibuogwu
@danielChibuogwu Жыл бұрын
thanks for this video it was really helpful
@goldmikanik8274
@goldmikanik8274 10 ай бұрын
First thank for the amazing free tutorial, I just have a question, I thought when you refresh the page you lose the cached data, but you refreshed it multiple times and the data persisted? As of my knowledge the react query library cache data in the javascript runtime environment which reset with refreshing 🤔
@OstonCodeCypher
@OstonCodeCypher 2 жыл бұрын
Great tutorial 👌 👍 👏
@hamidakbari3305
@hamidakbari3305 2 ай бұрын
very useful thanks
@abdullaprobably
@abdullaprobably 8 ай бұрын
This is 🔥🔥🔥🔥
@movoyemickele
@movoyemickele Жыл бұрын
I really love your teaching, however, since you're a full stack developer, I really hope you sell a back end course as well.
@nhatduong6595
@nhatduong6595 2 жыл бұрын
Thank you so much for this tutorial
@royhyde8842
@royhyde8842 10 ай бұрын
Wooooow thanks👏👏👏👏👏
@skgolamsaroar8483
@skgolamsaroar8483 9 ай бұрын
great video.. thank you.
@petrtcoi9398
@petrtcoi9398 Жыл бұрын
Great video!
@meka4996
@meka4996 Жыл бұрын
Very good! Thanks!
@aamirkhan-ql8er
@aamirkhan-ql8er 2 жыл бұрын
Hi Kyle, please also make video on react form hook
@cesarl.c.847
@cesarl.c.847 Жыл бұрын
Great video. Can share me any link where view use react query library without NPM and load with script CDN. Thanks so much.
@theisoj
@theisoj 2 жыл бұрын
*echo "Great tutorial. Thanks Kyle!"* *BTW, when do you make another tutorial about Prisma?*
@Rothguard98
@Rothguard98 Жыл бұрын
Is there a way to get access to those notes? seems like a super helpful resource
@yogeshdatir5983
@yogeshdatir5983 Жыл бұрын
What app are you using for note taking? Looks interesting. I use markdown but sometimes I like to have some more features.
@Desertphile
@Desertphile Жыл бұрын
Thank you; I am awed. :-)
@elab4d140
@elab4d140 2 жыл бұрын
Thank you, please do a tailwind tutorial like this
@elab4d140
@elab4d140 2 жыл бұрын
@@biggestthreattoyourexistence I already know css, but i heard tailwind is much better, but it has different syntax and a learning curve
This New React Hook Breaks All The Rules And I Love It
7:56
Web Dev Simplified
Рет қаралды 187 М.
Tanstack query (react-query) полный курс 2024
4:16:20
Евгений Паромов | Front-end
Рет қаралды 22 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Stop Using Pixels For Media Queries
18:48
Web Dev Simplified
Рет қаралды 59 М.
Why I don't use React-Query and tRPC in Next.js
18:58
ByteGrad
Рет қаралды 104 М.
Top 6 React Hook Mistakes Beginners Make
21:18
Web Dev Simplified
Рет қаралды 588 М.
React Query Makes Writing React Code 200% Better
13:54
Web Dev Simplified
Рет қаралды 200 М.
How React Query Won
34:52
Theo - t3․gg
Рет қаралды 91 М.
React Query - Complete Tutorial
18:57
Cosden Solutions
Рет қаралды 160 М.
React Query. Быстрый старт
30:09
Михаил Непомнящий
Рет қаралды 52 М.
10 Signs Your Software Project Is Heading For FAILURE
17:59
Continuous Delivery
Рет қаралды 35 М.
Learn React With This One Project
42:38
Web Dev Simplified
Рет қаралды 871 М.
I just tried o3-mini
6:31
ThePrimeTime
Рет қаралды 191 М.