Custom React Hook for Fetching Data (useQuery)

preview_player
Показать описание
In this video you'll learn how to create a custom react hook for fetching data. You will also learn the process of iterating and refactoring code as you follow the tutorial.

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

I was looking for refetch functionality, wasnt expecting it to be just export of fetch func :D

suatbayrak
Автор

I like your content, I like the way you explain. Thanks

princessmorriso
Автор

great, nicely explanation. at first I confused a bit at 14:16 why ()=>getPostById() not just getPostById() but now I got it because useQuery expected a callback function. if we pass getPostById() it will be the result of the function instead. So, we need to make getPostById() as a anonymous function by using arrow function to help.

MrQVeeBoo
Автор

dude, how you are not famous yet you are like 100x better than other web dev youtube teachers

adityasangave
Автор

Came to this video thinking you would be using useQuery (tansack/react-query) based on the title lol

smerny
Автор

UseNavigate is giving errors saying u should use it in useEffect hook only, it's seen in latest version of router dom
I was using it in functions to navigate upon some conditions

garrysyt
Автор

Hi,
thanks for sharing, very useful video!
Are you planning to create a video to use React with Typescript?
Elio

rjtcjfc