React Query Tutorial #2 - The useQuery Hook

preview_player
Показать описание
In this React Query tutorial we'll go over how to use the useQuery hook in order to get & manage async data in our React components.

🐱‍👤🐱‍👤 JOIN THE GANG -
----------------------------------------
🐱‍💻 🐱‍💻 My Udemy Courses:

🐱‍💻 🐱‍💻 Course Files:

🐱‍💻 🐱‍💻 Other Related Free Courses:

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

I am going to put "Trained by Shaun" on my resume and get all the jobs!

kiran
Автор

I would love to see react + typescript series if it's possible :D

Etheriiss
Автор

I got errors until I changed my App as follows:

import React, { useState } from 'react';
import { QueryClient, QueryClientProvider } from 'react-query'
import Navbar from './components/Navbar';
import Planets from './components/Planets';
import People from './components/People';

const queryClient = new QueryClient()

function App() {
const [page, setPage] = useState('planets');
return (
<QueryClientProvider client={queryClient}>
<div className="App">
<h1>Star Wars Info</h1>
<Navbar setPage={setPage} />
<div className="content">
{ page === 'planets' ? <Planets /> : <People />}
</div>
</div>
</QueryClientProvider>
);
}

songwright
Автор

Fantastic work. Thanks. At 13:00 when replacing multiple similar values, consider using Ctrl + H. It's much faster.

kevgits
Автор

Your'e not coming slow, this is amazing content :D
thanks :)

sadev
Автор

You are amazing Ninja !!
The best ever <3

ahmedmuhammedelsaid
Автор

now I see your udemy course and its amazing, I really thank you

shazaalbeik
Автор

you're gonna hit 1 million subs at this rate

chriskennedy
Автор

React Query is making the component life-cylce usage totally abstracted ("componentDidMount" or "useEffect") that's getting so easy now... Great video BTW as usual :)

fouflo
Автор

The speed of this lesson is kinda perfect :-)

kristianulvund
Автор

first i appreciated your work for us and thank you for that am asking about sapper hope to be next bez source for that is to few and really you are my resource

neelkremalliabo
Автор

You can mock a slow connection from the Network tab so we can see the loading screen/ status 😃

Elduque
Автор

I almost killed myself trying to implement a loading screen. Thanks for saving my life xD

salmansayeed
Автор

I have been working on it for 6 months, and now I'm working with a startup company 🙂
But the point is that I have a lot on plate lately I mean there's tons of tech things you gotta be super comfortable with and I'm not yet

AhmadMaartmesrini
Автор

Hi, thank you for this tutorial! I have this working on localhost but there is a status of error on the deployment. Is there another step for production?

stevensunsunsun
Автор

useMutation and queryCache along with optimistic UI updates will be great, if covered 🙂

arpanchattopadhyay
Автор

Hi, it's there any difference you have the fetch function outside function component, with having it inside the function component???

ricardoolartepuell
Автор

Is this the just a shorthand equivalent of using the useEffect hook to fetch data and useState hook to save the fetched data?

todaysrapsux
Автор

you can also use isLoading, isError or error and isSuccess instead of status.

davidho
Автор

The first parameter in useQuery(''planets') is it just descriptive and a visual help to tell you what the endpoint is, or am I missing something?

joeuser