React Query in 40 Minutes - Everything You Need to Know About Tanstack React Query

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024

ความคิดเห็น • 98

  • @sreerup_dhrino
    @sreerup_dhrino 2 หลายเดือนก่อน +4

    As of today working with react-query v5 I noticed two changes -
    1. If you are importing & calling a function from another file in queryFn it has to be written in a arrow function like queryFn: () => getData()
    2. Fetch request is getting called on browser tab change even without mentioning staleTime, and to stop it you need to explicitly mention refetchOnWindowFocus: false
    Please let me know if others are also facing the same.

  • @godofwar8262
    @godofwar8262 6 หลายเดือนก่อน +43

    Hey bro add tanstack query to video title for better reach

    • @stephikebudu
      @stephikebudu 6 หลายเดือนก่อน +7

      Yeah not everyone knows its the same thing

    • @centrumsaiyan7623
      @centrumsaiyan7623 3 หลายเดือนก่อน

      Seriously haha you need that title

  • @shirazjaf3844
    @shirazjaf3844 6 หลายเดือนก่อน +6

    amazing brother ! have been searching for a proper tutorial and found yours

  • @orashusedmund7675
    @orashusedmund7675 6 หลายเดือนก่อน +4

    thanks Pedro. I've been looking for a good video guide, just getting started with React query. was so happy when i saw yours.

  • @melkhywong7594
    @melkhywong7594 6 หลายเดือนก่อน +4

    did you read my mind bro? i was searching for this

  • @singhramneek3358
    @singhramneek3358 6 หลายเดือนก่อน +1

    How is this even possible? Just Finished your React Query module from react js course and found it bit outdated and here you are.... Just Wow😮

  • @shuvoahmed5217
    @shuvoahmed5217 5 หลายเดือนก่อน +2

    clean and informative . make more good video like this on various topic . eg : (react testing)

  • @aseel1024
    @aseel1024 5 หลายเดือนก่อน +1

    this is the best library to be honest, doing it native will take long time!!

  • @anmolkharel4433
    @anmolkharel4433 6 หลายเดือนก่อน

    i'm new to react and haven't used redux at all, i followed one of your react tutorials and have been using react query since, this video is much appreciated, thanks!

  • @DjSeymur
    @DjSeymur 3 หลายเดือนก่อน +2

    You should make your intro you spinning in a circle while the music plays "Pedro, Pedro, Pedro, Pedro Techhh" 😁

  • @andrewredican1413
    @andrewredican1413 3 หลายเดือนก่อน

    react-query is an amazing library, and great explanation!

  • @zalaam_0
    @zalaam_0 6 หลายเดือนก่อน +2

    I am not native english speaker but some how i can understand you clearly. Maybe your way of teaching is very good

  • @monoq_
    @monoq_ 4 หลายเดือนก่อน

    Thank you so much Pedro. I'm really liking your content about React because you explain very clear in your videos.

  • @lamiaali4519
    @lamiaali4519 6 หลายเดือนก่อน +1

    wow just what I was looking for, thank u for this amazing video.

  • @codermeloman3030
    @codermeloman3030 6 หลายเดือนก่อน

    React Query + Next.js 14 + prefetch query + using prefetched query in server side nested components ... would be amazing video!

  • @lopesleticiam
    @lopesleticiam 2 หลายเดือนก่อน

    Exactly what I was looking for! Thanks 🎆

  • @italofsan
    @italofsan 6 หลายเดือนก่อน +1

    Excelente vídeo meu brother. Deu um overview massa.

  • @tomasburian6550
    @tomasburian6550 4 หลายเดือนก่อน

    Great vid. Lots of companies now using this library, very useful.

  • @onsiteImagitech
    @onsiteImagitech 22 วันที่ผ่านมา

    A very usefull video I learned a lot thanks.

  • @abdelrahman5094
    @abdelrahman5094 3 วันที่ผ่านมา

    best explanation ever

  • @AbdAtaya
    @AbdAtaya 2 หลายเดือนก่อน

    Great bro, Wallah you are a Master

  • @ramanjaneyuluv479
    @ramanjaneyuluv479 5 หลายเดือนก่อน +1

    we need more videos of this kind

  • @afamsval
    @afamsval 6 หลายเดือนก่อน +1

    We want to see more videos on this. 😍 Thank you

  • @giovanniferreira1706
    @giovanniferreira1706 6 หลายเดือนก่อน

    A continuation video using complex searches, passing parameters, and such would be great.

  • @JOSEPHEZHAP
    @JOSEPHEZHAP 6 หลายเดือนก่อน +1

    Please make a video about pagination and advanced react query

  • @neilvenmascarinas4365
    @neilvenmascarinas4365 หลายเดือนก่อน

    thanks brother it help me a lot to understand react query♥

  • @jubert2096
    @jubert2096 3 หลายเดือนก่อน

    Thanks pedro. Your teaching is awesome. Can you make a video on tanstack react typescript. There are not that much videos on tanstack tables and I’m having lot of errors

  • @vinaykumarkharwar177
    @vinaykumarkharwar177 5 หลายเดือนก่อน

    This was concise and informative. Thanks!

  • @matheuspiegas
    @matheuspiegas 2 หลายเดือนก่อน

    Que vídeo excelente cara! Parabéns!

  • @haniehafzali9661
    @haniehafzali9661 22 วันที่ผ่านมา

    thank you that was so great 🌺🌺

  • @quentinhall8838
    @quentinhall8838 6 หลายเดือนก่อน

    welcome back pedro , your videos are the best

  • @Developer_BR
    @Developer_BR 3 วันที่ผ่านมา

    I think you is brazilian, right!? I started my channel trying record 100% in english, but the videos got very awkward. I always remember you when I want post a new video.

  • @bagheldevansh
    @bagheldevansh 6 หลายเดือนก่อน +1

    thank you so much for this!

  • @user-hd8tc3lg7l
    @user-hd8tc3lg7l 4 หลายเดือนก่อน

    It would be great to see your next video about react-query

  • @bruningoat
    @bruningoat 4 หลายเดือนก่อน

    it would be cool if you could bring more videos about this topic maybe a project using pagination and infinite scroll as you mentioned

  • @SuperMBARutgers2013
    @SuperMBARutgers2013 20 วันที่ผ่านมา

    Staletime is a win for me.

  • @palcherin
    @palcherin 6 หลายเดือนก่อน

    This is great, hey bro.. can you please make a video regarding react-google-maps? I think if you do the video it could help a lot of people wasting time on alot of tutorials that doesn't teach much.

  • @Goku-zu3rk
    @Goku-zu3rk 2 หลายเดือนก่อน

    Maybe more on dependencies and query Keys?

  • @BugArray
    @BugArray 6 หลายเดือนก่อน

    Awesome content, I might also cover this topic in one of my videos.

  • @KaranChauhan-fu6dy
    @KaranChauhan-fu6dy 6 หลายเดือนก่อน

    I just completed it... loved it

  • @k303k
    @k303k 6 หลายเดือนก่อน +2

    We miss u pedro❤

  • @King_slayer-hd7df
    @King_slayer-hd7df 6 หลายเดือนก่อน

    Thanks for the refresher 👍

  • @thebocksters2756
    @thebocksters2756 5 หลายเดือนก่อน

    16:16 and what is the difference between isLoading and isPending

  • @bobsecondbrain9330
    @bobsecondbrain9330 5 หลายเดือนก่อน

    Fantastic tutorial!

  • @izunduchukwuemika7915
    @izunduchukwuemika7915 5 หลายเดือนก่อน +1

    thanks pedro🤜

  • @rajeevbhosle1580
    @rajeevbhosle1580 หลายเดือนก่อน

    thanks for the video , can you please share the link of repo....

  • @cholakovit
    @cholakovit 5 หลายเดือนก่อน

    Hi excellent video :)
    Would you make a video how exactly react query can manage globally state ?

  • @metalfort1207
    @metalfort1207 6 หลายเดือนก่อน

    Thanks I can now flex to my bosses some React Query stuff

  • @jatiquep5543
    @jatiquep5543 6 หลายเดือนก่อน

    I have been waiting for this

  • @abdulazeezonadipe6236
    @abdulazeezonadipe6236 6 หลายเดือนก่อน

    Thanks so much, this was superful. I hope you could work on the pagination also,
    also is this proper
    { queryKey: ['word', 'status', 'done'] }

  • @adi-ai-007
    @adi-ai-007 3 หลายเดือนก่อน

    Nicely explained

  • @sonamohialdin3376
    @sonamohialdin3376 6 หลายเดือนก่อน

    Very helpful tutorial thank you

  • @mjylove2
    @mjylove2 2 หลายเดือนก่อน

    what theme do you use? i looks awesome

  • @mihaichildesco8276
    @mihaichildesco8276 6 หลายเดือนก่อน +1

    i dont understand why your code was working and my code not. When you use useQuery for fetching data with id and title i was getting data undefined, after i added isLoading and isError it worked. "In the initial render without isLoading and isError checks, your component tries to map over data, which is undefined, hence causing an error. React doesn't render components with errors, so your component won't be displayed." This was an explication from chatGpt and still dont get it why handling isLoading and isError made the code to work and fetch the data

    • @coderintrovert
      @coderintrovert 6 หลายเดือนก่อน +1

      you can set initial data as empty array, like this const { data = [] } = useQuery…..
      If you dont want to set initial data then when you are mapping over it have some check like data?.map or data && data.map

    • @chippandenga6722
      @chippandenga6722 3 หลายเดือนก่อน

      I am also getting data undefined error but my code is an exact copy of his???? Thanks for this comment. I was thinking I am losing my mind😂

  • @tiny_mystery
    @tiny_mystery 6 หลายเดือนก่อน

    thanks for the tutorial brother,

  • @ValeriiLutiy
    @ValeriiLutiy 6 หลายเดือนก่อน

    ty Pedro, hello from Ukraine 👋

  • @dyarydy6939
    @dyarydy6939 5 หลายเดือนก่อน

    Thank you Perdo

  • @niklausmikaelson7332
    @niklausmikaelson7332 29 วันที่ผ่านมา

    How can we replace redux,zutand with react query

  • @regilearn2138
    @regilearn2138 6 หลายเดือนก่อน

    it would be great if you can use typescript with this

  • @nullwizard6335
    @nullwizard6335 6 หลายเดือนก่อน

    Thanks for this. I was wondering what is the benefit of using this library over redux? Because I can do pretty much same using redux and more.

  • @2ameridiem
    @2ameridiem 6 หลายเดือนก่อน

    I have been following your Reactjs course 2023 and there in the react-query tutorial, you mentioned that the queryFn should return the data fetched by the Fetch API, which then will be stored in the variable. Why are we returning a promise in this case?..considering that the json() method returns a promise.

  • @mehedihassan6904
    @mehedihassan6904 6 หลายเดือนก่อน

    make a detailed advance video on react-query please with real backend data

  • @bobkazamakis5169
    @bobkazamakis5169 5 หลายเดือนก่อน

    Should I stick to RTK Query when using Redux?

  • @tariqahmed2526
    @tariqahmed2526 6 หลายเดือนก่อน

    Plzz make a latest firebase tutorial or app write it will be helpful

  • @rumonintokyo
    @rumonintokyo 4 หลายเดือนก่อน

    Did u try it using with next js 14? When I try to use it with next js 14 and create a custom hook that fetches data from the server using tanstack .... the data seem to load properly but the html content does not appear on the page source... note am using the custom hook in a client component...

  • @waleedsharif618
    @waleedsharif618 6 หลายเดือนก่อน

    One question, when we are using for example Axios and want to test it using react testing library we can mock it. How can we test this react-query ?

  • @mohammadshezan
    @mohammadshezan 6 หลายเดือนก่อน

    Awesome, Next time do it with Infinite Scrolling

  • @dizzland
    @dizzland หลายเดือนก่อน

    Amazing tutorial

  • @zainn7336
    @zainn7336 6 หลายเดือนก่อน

    please make video on infinite and pagination in react query plzzz

  • @gamingwolf3385
    @gamingwolf3385 6 หลายเดือนก่อน

    Pedro , why you don't try svelte/kit

  • @favanzzo
    @favanzzo 6 หลายเดือนก่อน

    pedrao, sua opinião sobre a fala do CEO da nvidia?

  • @gregorysk_lviv
    @gregorysk_lviv 3 หลายเดือนก่อน

    I wonder, what is the name of the extension which shows size of npm lib

    • @dedanmsafari8213
      @dedanmsafari8213 3 หลายเดือนก่อน +1

      its called import cost

  • @joeblack8843
    @joeblack8843 4 หลายเดือนก่อน

    i found out that it doest work with axios

  • @ilmanmanarulqori5632
    @ilmanmanarulqori5632 6 หลายเดือนก่อน

    make another one React Query 🎉

  • @user-uw6pr7gv5x
    @user-uw6pr7gv5x 6 หลายเดือนก่อน

    Why using CRA and not VITE ? CRA is so slow!

  • @emmanuelxs6143
    @emmanuelxs6143 6 หลายเดือนก่อน

    Pedro 😊

  • @anburaghu6294
    @anburaghu6294 5 หลายเดือนก่อน

    can we get the source code bro??

  • @hooooman.
    @hooooman. 6 หลายเดือนก่อน

    one request, not about the teaching ,but about the video. Most of the time , in addition to the youtube, viewers, mostly beginners ,also needs to open multiple apps, such as vs code or any code editor, ,browser with multiple tabs, other softwares such as postman etc, so students like me, who has a midrange pc, it would be a slightly heavy load for the device. so in addition to this, if the youtube video itself is also 60fps, it will just double the ram consumption and load to the CPU. Unlike a gaming video which requires 60fps, 1080px @ 30 fps is more than enough for coding videos. so please consider this request in the future videos.

  • @DrippedFilms
    @DrippedFilms 6 หลายเดือนก่อน

    No. 3 - 😂

  • @KisanKumavat-m5e
    @KisanKumavat-m5e 2 หลายเดือนก่อน

    +++

  • @sandunlasantha
    @sandunlasantha 6 หลายเดือนก่อน +1

  • @Pareshbpatel
    @Pareshbpatel 4 หลายเดือนก่อน

    {2024-04-29}

  • @jetskeeter69
    @jetskeeter69 5 หลายเดือนก่อน

    Is there one that uses with nodejs to my database using MySQL?