React Query - Full Tutorial 2024 🔥🔥

Поделиться
HTML-код
  • Опубликовано: 5 июн 2024
  • ➡️ Book an Interview Preparation call with me ( 20% OFF for limited time ) - topmate.io/roadsidecoder
    🟪 Follow me on Instagram and u will clear your interview 🤓 - / roadsidecoder
    👤 Join the RoadsideCoder Community Discord - / discord
    How to use React query v5 or Tanstack Query v5 to fetch and manipulate data. React Query makes fetching, caching, synchronizing and updating server state in your web applications a breeze. This tutorial is beginner friendly.
    ➡️ Source Code -
    github.com/piyush-eon/react-q...
    🔗 React JS Interview Series -
    • Frontend Machine Codin...
    🔗 Complete Data Structures and Algorithms with JS Course - • Data Structures and Al...
    🔗 JS Interview Series -
    • Javascript Interview Q...
    🔗 Cars24 Interview Experience -
    • Frontend Interview Exp...
    🔗 Unacademy Interview Experience -
    • Frontend Interview Exp...
    🔗 Tazorpay Interview Experience -
    • Frontend Interview Exp...
    🔗 MERN Stack Tutorial with Redux -
    • MERN Stack Project Tut...
    🔗 React Beginner's Project Tutorials -
    • React JS Project Tutor...
    #Javascript #reactjstutorial #ReactJS
    -------------------------------------------------------------------------
    00:00 Intro
    00:26 Setup New React App
    01:34 Setup React Query
    04:38 useQuery Hook
    07:45 What we will build
    08:53 useQuery Hook Continued
    12:42 React Query Devtools
    14:09 useMutation Hook
    22:40 Query Invalidation
    26:13 useMutation Continued
    28:18 Data Caching in React Query
    31:58 Pagination
    38:00 Infinite Scrolling
    38:52 Next Steps
    -------------------------------------------------------------------------
    ⭐ Support the channel -
    / @roadsidecoder
    Special Thanks to our members -

Комментарии • 68

  • @RoadsideCoder
    @RoadsideCoder  4 месяца назад

    🔴 Get my Complete Frontend Interview Prep course - roadsidecoder.com/course-details
    🟪 Follow me on Instagram and u will clear your interview 🤓 - instagram.com/roadsidecoder/
    👤 Join the RoadsideCoder Community Discord - discord.gg/2ecgDwx5EE

  • @houriayaseen5487
    @houriayaseen5487 3 месяца назад

    I liked the video and now commenting before I even finished it. your explanation is awesome 🔥

  • @cutebaby_richu22
    @cutebaby_richu22 4 месяца назад +1

    Yes i was waiting for it😍... Finally came🥳

  • @ghanshyamdobariya8875
    @ghanshyamdobariya8875 3 месяца назад

    I bought one course that has react-query tutorials, but your video is far better..

  • @aswathisk5461
    @aswathisk5461 3 месяца назад

    Bro just rocked....when I want this...tqsm

  • @PoojaKavlekar
    @PoojaKavlekar 5 дней назад

    Nice explanation, helped alot thanks.

  • @Rajesh-rg6fw
    @Rajesh-rg6fw 4 месяца назад +2

    Can you tell, Rtk query or react query witch one is used most in the industry? and witch one is better?

  • @chhavimanichoubey9437
    @chhavimanichoubey9437 Месяц назад

    I can say this video covers the essentials, and coders then will read docs to get more familiar with advanced topics of tanstack.

  • @marimuthurajendran67
    @marimuthurajendran67 3 месяца назад

    Hi Thank you for this wonderful tutorial,
    The main thing is getting access the data in different component,could you please explain how we can acheive it

  • @Mr___Khan1
    @Mr___Khan1 8 дней назад

    Nice Explanation Sir ♥️

  • @gjn4323
    @gjn4323 2 месяца назад +1

    We definitely need a project tutorial on this

  • @AdilAnsari-im1ir
    @AdilAnsari-im1ir 4 месяца назад +6

    Please make a video with RTK

  • @rubynathanrubynathan2875
    @rubynathanrubynathan2875 4 месяца назад

    ❤ love it🎉

  • @parvezshaikhjr
    @parvezshaikhjr 2 месяца назад

    There is a lot of discussion whether to use any state management library like Redux, Zustand, etc or not when we are using React query. My question would be can we use React query as store management library also?!

  • @shahriar_ferdous
    @shahriar_ferdous 3 месяца назад

    Awesome❤️

  • @abhik9077
    @abhik9077 4 дня назад

    yes project tutorial needed...

  • @jahangirkhan3747
    @jahangirkhan3747 4 месяца назад

    Thanks bro ❤

  • @absiddik7841
    @absiddik7841 4 месяца назад

    Yes, make a project tutorial video using react query

  • @Pareshbpatel
    @Pareshbpatel Месяц назад +1

    Nice overview of TanStack React Query V5. Thanks.
    {2024-04-29}

  • @RavindraSingh-lp9pl
    @RavindraSingh-lp9pl 4 месяца назад

    waah bhai majaa aagyaaa...one video for RTK React please.

  • @kelvinnwachukwu8141
    @kelvinnwachukwu8141 2 месяца назад

    Nice explanation please can you do a full stack app with typescript where such can be used with react queries

  • @deep90402
    @deep90402 4 месяца назад

    Please make videos on javascript machine coding rounds will be really helpful

  • @AnandakumarMoorthi
    @AnandakumarMoorthi 2 месяца назад +1

    yes please make a complete project by using react query

    • @samduss4193
      @samduss4193 Месяц назад

      he does not need i think he already provide detail enought

  • @warriorwarlord6706
    @warriorwarlord6706 2 месяца назад

    Kindly make the complete project tutorial by using react query

  • @sdfsfsfd437
    @sdfsfsfd437 4 месяца назад

    ¡Awesome video!

    • @RoadsideCoder
      @RoadsideCoder  4 месяца назад +1

      Thanks!

    • @Lucifer-xt7un
      @Lucifer-xt7un 4 месяца назад

      ​@@RoadsideCoder you said you will be coming with course in 1st week of feb may i know its status please

  • @InspireNextOfficial
    @InspireNextOfficial 4 месяца назад

    Awesome, i have a doubt, what if i want to use postsData in some other components ?

    • @RoadsideCoder
      @RoadsideCoder  4 месяца назад

      Pass it down by props or store in redux or context api

    • @InspireNextOfficial
      @InspireNextOfficial 4 месяца назад

      @RoadsideCoder okay, if you make a video on RTK Query, please explain how to use fetched data anywhere in the app using the useSelector.

  • @erved
    @erved 2 месяца назад

    dost ek baat me bahut confuse rhtaa hu ki nextjs seekhne ke baad in cheejo kaa koi use hai, i mean if i go with react basics +nextjs mastery fir redux, toolkit andrtk query inkee need kyaa rhegi, by the way aapki energy and tareeka bahut achchhaa hai

    • @yashmishra5796
      @yashmishra5796 12 дней назад

      No they are a pre built functionalities in the Nextjs that's why Nextjs is a franework

  • @himankshu
    @himankshu 3 месяца назад +1

    do you use react-query in your production apps? It is better that we are learning but just curious that are companies using it for production apps? I searched jobs on react-query on linkedin but none of them mentioned it in the job description.

    • @user-dd7kw3ym5i
      @user-dd7kw3ym5i 3 месяца назад

      i don't know the answer though, why this library was created if it's not used on production and only on development? The library's goal is to make users/clients experience better by handling the caching, fetching, etc by it and make web apps more performant

    • @markoscouse
      @markoscouse 3 месяца назад

      It's just a library, companies don't mention stuff like this unless it's something super specific they absolutely require you to know before working there

  • @regilearn2138
    @regilearn2138 4 месяца назад

    It would be great if use Typescript with this

  • @adamseekerfan12
    @adamseekerfan12 4 месяца назад

    Please make video on tanstack router beginner level to advance

  • @RajGupta-cu9hi
    @RajGupta-cu9hi 3 месяца назад

    In React query 5 how to use onSuccess

  • @hardiknaik7444
    @hardiknaik7444 4 месяца назад

    Please make video on framer motion

  • @TheViral_fyp
    @TheViral_fyp 3 месяца назад

    Bhai live aao this Sunday!!❤

  • @VeshalRaj-fk4ky
    @VeshalRaj-fk4ky 4 месяца назад

    do we need axios if we are using react query for fetching and posting some data in the server?

    • @RoadsideCoder
      @RoadsideCoder  4 месяца назад +1

      nope, its optional

    • @saiharshapingali7577
      @saiharshapingali7577 4 месяца назад

      @@RoadsideCoder bro what is the difference between Redux and React Query ?

  • @wanderar123
    @wanderar123 4 месяца назад +3

    is this still relevent after Nextjs ? (do Nextjs has some inbuilt feature like this)

  • @j2etech602
    @j2etech602 4 месяца назад

    Is it possible to update newly created post to the post list locally without invalidate the post list query? (To reduce API).

    • @RoadsideCoder
      @RoadsideCoder  4 месяца назад

      Yes, using setQueryData -
      onSuccess: (data, variables, context) => {
      // 👇 We can manually add to posts to avoid api calls
      queryClient.setQueryData(["posts"], (old) => [data, ...old]);
      },

  • @ragucool9468
    @ragucool9468 4 месяца назад

    React redux with JWT Authentication - Sign up, Login, Logout & Private Route(access and refresh token redux state management ).how to handle token or session(state management redex store) in enterprice level application ....thanks in advance bro ... eagarly waiting bro..create enterprice level small application ( like ecommerce with cover all topics bro)

  • @mdsafikulislam9113
    @mdsafikulislam9113 4 месяца назад

    Which VS Code extension are you using for auto completing?

  • @krishnaagarwal7934
    @krishnaagarwal7934 4 месяца назад

    Can we have videos on typescript

  • @Gymaurcode
    @Gymaurcode 4 месяца назад +1

    I wish you upload video on RTK Query

  • @vignesha8619
    @vignesha8619 3 месяца назад

    pls make to build chatBot using MERN stack

  • @rahul191jain
    @rahul191jain 4 месяца назад

    How can we use useQuery to call an api on certain action like button click or probably conditionly as usequery is a hook so I am sure we can not or should not use it conditionally. Or I am missing anything here.

    • @RoadsideCoder
      @RoadsideCoder  4 месяца назад

      Can you give me an example on what type of query u wanna fetch?
      Because generally you will have a separate component for that which will mount and trigger its own query.

    • @RoadsideCoder
      @RoadsideCoder  4 месяца назад

      Also, you can use states like the "page" example that i showed you, when page variable changes the query gets triggered

    • @rahul191jain
      @rahul191jain 4 месяца назад

      @@RoadsideCoder There are times where we have parent(container) that handles all api calls and take decision after api call response on which page to go to. Yes I understand there can be multiple ways to handle things, but I believe api calls can be called at any point of time. Probably useQuery can return a function that we can call to actually call the api.

    • @rahul191jain
      @rahul191jain 4 месяца назад

      @@RoadsideCoder 1 more example can be let's say my first api gives me some data depending on which I need to call other api on same component. I think this is also common use case of get api call

    • @RoadsideCoder
      @RoadsideCoder  4 месяца назад

      @@rahul191jain FOr that I mentioned in the end that we have a useQueries hook as well

  • @yourlinuxguy
    @yourlinuxguy Месяц назад

    Data fetching nhi kind of state management h ye to

  • @rishiraj2548
    @rishiraj2548 4 месяца назад

    👍🙏

  • @SureshChidurala
    @SureshChidurala 2 дня назад

    🎯 Key points for quick navigation:
    00:00 *🚀 Overview of React Query*
    - React Query is an asynchronous state management library for TypeScript and JavaScript apps
    - Key features include caching, refetching, pagination, and more.
    01:48 *📦 Setting Up React Query*
    - Installation of React Query and Json Server for mock APIs
    - Creating mock APIs using Json Server for testing React Query functionality.
    04:02 *🛠️ Configuring React Query*
    - Configuring the query client and provider in React app
    - Setting up the initial structure to start using React Query for data fetching.
    04:43 *🔄 Data Fetching with React Query*
    - Demonstration of using the `useQuery` hook to fetch data
    - Features like data, loading status, and error handling provided by React Query out of the box.
    07:51 *🔗 React Query Dev Tools*
    - Introduction to React Query Dev Tools for monitoring data states
    - Utilizing Dev Tools for debugging and monitoring data fetching in React Query.
    14:16 *📤 Mutating Data with React Query*
    - Explanation of how to use mutations in React Query for sending POST requests
    - Demonstrating the `useMutation` hook and handling data updates through mutations.
    21:51 *🔒 Caching feature of React Query*
    - Explanation of how caching works in React Query
    - Invalidation of data to trigger refetch
    - Functions like on success and on mutate for handling cache invalidation
    23:11 *🔄 Invalidation of queries on success*
    - Using on success function to invalidate queries
    - Accessing the Query Client API for cache management
    - Configuring exact option to invalidate specific queries
    26:19 *🚦 Handling mutations with React Query*
    - Exploring functions like on mutate, on error, and on settled
    - Implementing UI changes based on mutation state
    - Resetting errors to manage application state
    29:24 *🔄 Managing data freshness and staleness*
    - Explanation of stale, fresh, and cache concepts in React Query
    - Configuring stale time and GC time for data management
    - Demonstrating the impact of stale and fresh data on API requests
    32:06 *📄 Implementing pagination with React Query*
    - Setting up pagination buttons in the UI
    - Updating the page state for fetching specific pages
    - Managing data caching and automatic query invalidation for pagination
    Made with HARPA AI

  • @ZahoorMohammed-hh8cz
    @ZahoorMohammed-hh8cz 20 дней назад +1

    very bad explanation after half video, unable to understand anything

  • @ronaldchiagozie8317
    @ronaldchiagozie8317 2 месяца назад

    am i the only one with errors?URIError: URI malformed
    at decodeURIComponent ()