Create A Custom Hook in React | React Hooks Tutorial

  Рет қаралды 15,181

PedroTech

PedroTech

Күн бұрын

Пікірлер: 46
@codebreakthrough
@codebreakthrough 2 жыл бұрын
congrats on reaching your 10K subscriber goal!
@PedroTechnologies
@PedroTechnologies 2 жыл бұрын
Thank you so much Caleb! I remember watching your old c++ vids and I really liked them, glad to see you here!
@paras5345
@paras5345 2 жыл бұрын
this video was clean srsly watched bunch on this topice but this is most clear
@tomasgilamoedo8301
@tomasgilamoedo8301 2 жыл бұрын
Great explanation Pedro! keep on moving brobro, u reaching 50k soon! 🙌
@CuteCreeperYT
@CuteCreeperYT 3 жыл бұрын
Excellent work you've put up there Pedro. I mean this is just everything, if the basic is clear, complex logic can be implemented with much less efforts.
@rohmaabdulfattah2582
@rohmaabdulfattah2582 2 жыл бұрын
Very good.! Of all the videos I've watched, this explains in all in a simple and clear term
@spondoolie6450
@spondoolie6450 2 жыл бұрын
Congrats on reaching your 10k subscriber goal (I think I was number 30-something thousand subscriber)
@k303k
@k303k Жыл бұрын
Really appreciated for your efforts for making videos.Thanks a lot .
@cliffvbajo
@cliffvbajo 2 жыл бұрын
A good starting point to learn custom hooks! thank you
@hosseinnouri4065
@hosseinnouri4065 2 жыл бұрын
thank u , i finally learn how to write custom hooks
@eduardolopes1270
@eduardolopes1270 2 жыл бұрын
Opa Pedro Cara, como que tu estudou inglês? Não lembro de ter ouvido uma pronuncia tão boa e uma fala tao fluida vindo de um BR. Abraços
@PedroTechnologies
@PedroTechnologies 2 жыл бұрын
Boa Eduardo! Eu tive a sorte de poder estudar em uma escola internacional desde cedo, por isso tenho uma pronuncia melhor que o normal kkkkkk mas obrigado por ver os videos :) Abraços
@khandoor7228
@khandoor7228 3 жыл бұрын
what would you recommend either custom hook as described here, useSWR or React Query?
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
I would recommend React-Query for most intermediate to hard projects. But if you are building something huge that will have thousands of lines of code, maybe creating ur custom fetcher is better cause you have more control over it!
@lokmanlife3023
@lokmanlife3023 3 жыл бұрын
Awesome as always. I got a question not related to this video. Its regarding the login system. Do you have a video on if the user login, will redirect to a profile page which show the logger info? if you dont, can you make a video on this topic? thank you..
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Thank you! I have a video on redirecting in React, however to display users information you just have to keep the users id and pass its id through a state or a prop.
@khandoor7228
@khandoor7228 3 жыл бұрын
Excellent work Pedro, I like the simple example followed by a real world example, good technique.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad you liked it! I am trying out different styles of tutorials!
@danielrahmani7075
@danielrahmani7075 2 жыл бұрын
You are amazing dude . Keep going man❤️🤝
@subliminakeys1674
@subliminakeys1674 2 жыл бұрын
If you used that hook multiple times in your code wouldn't you need to destructure it to a different variable everytime? Example you have 'response' but if you copied and pasted that multiple times like you did at the end wouldn't it give an error? I'm assuming you would need to make the first usehook variable response then the second like response2 etc. Am I correct about that?
@abhaytiwari6411
@abhaytiwari6411 3 жыл бұрын
I admire your work
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Thank you so much! This support motivates me a lot!
@JamesSmith-yj7wq
@JamesSmith-yj7wq 2 жыл бұрын
Passing the request to useQuery is causing the axios to run the api request twice.. if you call the axios request from useQuery and only pass in the url to fetch, the api will only run once..
@kenanyildiz90
@kenanyildiz90 2 жыл бұрын
I think you need to check response before putting img src like `response?.image` request usually takes time.
@bonifacetom7116
@bonifacetom7116 2 жыл бұрын
Thanks so much bro for the wonderful explanation with simple code implementation. You just saved me
@vamshikrishnareddy76
@vamshikrishnareddy76 2 жыл бұрын
I don't know it's just giving me a blank page. Without creating a custom hook it just wrote the same code as you and tried to run it.. it created a button when ever I click on it it doesn't change color and tried creating a custom hook now it just gives me a blank page not sure why...
@maxmaksum4673
@maxmaksum4673 3 жыл бұрын
great as always..thank you
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Thanks you for watching!
@Pareshbpatel
@Pareshbpatel 2 жыл бұрын
Excellent Tutorial on React Custom Hooks. I found it very useFul ;-) - Thanks, Pedro {2022-02-14}, {2023-07-12}
@PedroTechnologies
@PedroTechnologies 2 жыл бұрын
Glad it was helpful!
@MindOFAlfie
@MindOFAlfie 2 жыл бұрын
Perfect tutorial!
@Lohitpant
@Lohitpant 3 жыл бұрын
Thanks. Completed it and after seeing so many Indian dishes, I am hungry.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
hahaha enjoy lunch
@chinthana
@chinthana 3 жыл бұрын
Great video.. Thanks..
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad you liked it!
@mahendranath2504
@mahendranath2504 3 жыл бұрын
Thank you 👍🏼❤️🙏
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
No problem 😊 Glad you liked it!
@RalfSchlindwein0
@RalfSchlindwein0 3 жыл бұрын
use custom hook starts 9:45
@chinthana
@chinthana 3 жыл бұрын
Can U just extend this video.. Where we need to get two values.. {loading: true, data:{}} ====> before loading.. And after loading ==> {loading:false, data:{real data fetched }}... If possible can U make video in future? 🙂
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
I can make one in the future!
@DeepakGupta-pz4fx
@DeepakGupta-pz4fx 3 жыл бұрын
Please make on video complete hook series
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Good Idea!
@DeepakGupta-pz4fx
@DeepakGupta-pz4fx 3 жыл бұрын
Waiting please complete hook series
@oz4549
@oz4549 3 жыл бұрын
how can I buy you coffee? Thank you for this.
@spondoolie6450
@spondoolie6450 2 жыл бұрын
click on the 'Thanks' button
@teneshvignesan6227
@teneshvignesan6227 Жыл бұрын
Not a big deal but if you ever making a tutorial, you don't have to speed rush. Try to be slower when explaining if not this is pointless in my opinion, although respect for you effort to help others.
Manipulating the DOM In ReactJS | useRef
16:10
PedroTech
Рет қаралды 36 М.
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 124 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 12 МЛН
ReactJS Course [12] - Custom Hooks Tutorial
22:54
PedroTech
Рет қаралды 28 М.
useMemo Explained | React Hooks useMemo Tutorial
13:00
Dave Gray
Рет қаралды 29 М.
5 REACT CUSTOM HOOKS You Should Start Using (Explained)
12:46
AlterClass
Рет қаралды 16 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 489 М.
Custom Hooks in React (Design Patterns)
12:56
Cosden Solutions
Рет қаралды 53 М.
How to Fetch Data in React With A Custom useFetch Hook
16:37
PedroTech
Рет қаралды 78 М.
Custom Hooks in ReactJS 🥳 - Best Code Example
12:39
Studytonight with Abhishek
Рет қаралды 1,8 М.
Why I Love useReducer
22:40
Harry Wolff
Рет қаралды 92 М.
React Router Full Tutorial - ReactJS Beginner Tutorial
30:44
PedroTech
Рет қаралды 24 М.