Full React Tutorial #20 - Making a Custom Hook

Full React Tutorial #20 - Making a Custom Hook

Net Ninja

3 года назад

248,331 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Mister Voldemort
Mister Voldemort - 15.11.2023 01:04

Thanks

Ответить
Кирилл Терехин
Кирилл Терехин - 09.11.2023 16:02

amazing explanation thanks 🥰

Ответить
Aaron
Aaron - 08.11.2023 21:31

very cool!

Ответить
Shubham Hire
Shubham Hire - 03.11.2023 17:45

Thanks man

Ответить
Yahya
Yahya - 03.11.2023 10:49

This is the what i was looking for, you saved my life i was struggling to move the useEffect to another file. Thank you ❤

Ответить
McRyach
McRyach - 17.10.2023 05:52

I watched 4 different Custom Hooks video tutorials. And the one from Net Ninja 🥷 is by far the most complete and comprehensible.

Ответить
Han Solo
Han Solo - 12.10.2023 11:44

Thanks Shuan

Ответить
Ebubechukwu Innocent
Ebubechukwu Innocent - 11.10.2023 13:20

Just started this course and I have already built a landing page, something I have been tryjng for a year now, thanks so much

Ответить
Nik
Nik - 07.10.2023 13:38

code of this video with explaination

Ответить
Mariam Pureliani
Mariam Pureliani - 23.09.2023 15:42

Love the way you explain every detail! 💫 You da Best 💯❤

Ответить
Abdul Wahab
Abdul Wahab - 19.09.2023 20:00

Isnt useFetch is like react-query ?

Ответить
Naga Mohith Pyda
Naga Mohith Pyda - 11.09.2023 09:15

since useEffect is now dependent on url, everytime the url changes, it renders new one!
but.. it there is a url that gives us error, the old template remains in tact.
To avoid that, we can setData(null) in catch..

Ответить
ye qin
ye qin - 07.09.2023 13:01

My hero man,awesome,Ninja

Ответить
Gintas Ltu
Gintas Ltu - 06.09.2023 18:32

At lesson 20 have issues with "Unexpected token '<', "<!DOCTYPE "... is not valid JSON REACT" any ideas?

Ответить
Prasath J
Prasath J - 27.08.2023 10:23

This is excellent!!!

Ответить
somedoga
somedoga - 23.08.2023 19:25

Hey, thank you for useful informations! Why dont we use async and await but using setTimeout instead?

Ответить
Miika Kontio
Miika Kontio - 14.08.2023 00:28

Really good tutorial and helped me exactly how I needed. I managed to do useFetch myself and get rid of hundreds of lines of duplicate code

Ответить
SuperMBARutgers2013
SuperMBARutgers2013 - 11.08.2023 05:16

How can the custom hook be called with a button? Basically, like a Get Bloglist Submit button

Ответить
Haidara Yushau
Haidara Yushau - 04.08.2023 13:53

How can I love this more than once?

Ответить
More Blessing
More Blessing - 02.08.2023 01:48

This tutorial is 100% legit

Ответить
Henrich Šúry
Henrich Šúry - 31.07.2023 16:39

How to fetch multiple endpoints with custom hook?

Ответить
JGBFG Jochen Gabriel
JGBFG Jochen Gabriel - 22.07.2023 20:03

Thank you very much for this, but if i tray to fetch Date from Wordpress Rest Api then an error occurs "Objects are not valid as a React child If you meant to render a collection of children, use an array instead." how can ich solve this?

Ответить
Shahzaib Atif
Shahzaib Atif - 30.06.2023 23:23

That's excellent explanation.
The only thing I would like to add in this custom hook is a cleanup function to abort the fetch request in case of unmounting etc.

Ответить
Gabriel Alejandro
Gabriel Alejandro - 28.06.2023 17:49

very nice! :)

Ответить
Nkdsnk
Nkdsnk - 16.06.2023 12:31

For the first time I don't want a tutorial to end - learning so freaking much

Ответить
Muhammad FaruQ
Muhammad FaruQ - 14.06.2023 22:47

Thank you

Ответить
o
o - 31.05.2023 17:34

Thanks for your video, but there is a question. Since fetch is an aysnc function, we get the data after 1 second, but you return them immediately. Is there any trouble?

Ответить
Nelson Dayo
Nelson Dayo - 24.05.2023 05:43

You are a great teacher

Ответить
mohamed amin
mohamed amin - 16.05.2023 14:23

i love you man, your tutorials are simply amazing

Ответить
@tappebaj gaming Maudaha
@tappebaj gaming Maudaha - 09.05.2023 11:46

My custom Hook is not working

Ответить
Ghaffaru Mudashiru
Ghaffaru Mudashiru - 06.05.2023 14:16

Impressive bro... 10/10

Ответить
Amjad Ali Afridi
Amjad Ali Afridi - 09.04.2023 20:21

superb work

Ответить
Abtaf
Abtaf - 08.04.2023 04:43

it is one of the best learning methods that suit me!
thanks👋

Ответить
CryptoPinky
CryptoPinky - 20.03.2023 21:10

this is awesome! the best explanation of the topics/

Ответить
Shadebinder
Shadebinder - 10.03.2023 06:52

what do you call that thing where you use a colon to make blogs reference the data passed in? Does that have a name?

Ответить
Susil Jena
Susil Jena - 27.02.2023 20:54

What if it's a post request ?

Ответить
Ashwin Suryawanshi
Ashwin Suryawanshi - 26.02.2023 07:40

Thanks for giving a super practical use case for the example. This makes code very clean and easy to use. ⭐

Ответить
Akinrotimi Daniel
Akinrotimi Daniel - 12.01.2023 13:42

Kudos bro, I'm no fan of JavaScript, or should I say 'was'.

This tutorial is just perfect

Ответить
Akkaradech Srithongchai
Akkaradech Srithongchai - 07.01.2023 18:25

Ответить
subee128
subee128 - 05.01.2023 11:49

Thanks

Ответить
Osama Maher
Osama Maher - 27.12.2022 13:15

Really great explanation 👏

Ответить
MunkyChunk
MunkyChunk - 19.12.2022 20:33

You making developing fun. Why? Because you make it feel not like a chaotic minefield in ones' head. Obrigado (I am not Portuguese nor Brasilian).

Ответить
MunkyChunk
MunkyChunk - 19.12.2022 20:31

I LOVE YOU

Ответить
Rehan butt
Rehan butt - 11.12.2022 20:08

perfect

Ответить
Mac Fitton
Mac Fitton - 05.12.2022 22:07

Does anyone know why when my custom hook returns the variables as an object instead of an array they come back as "undefined" but if I return the values in an array they're properly accessible?

Ответить
Jovan Tancevski
Jovan Tancevski - 29.11.2022 03:06

Excellent , well done !

Ответить
Ken Skversky
Ken Skversky - 14.11.2022 09:32

Excellent explanation!

Ответить