Custom React Hooks For Beginners with Typescript [2022]

Custom React Hooks For Beginners with Typescript [2022]

The Nerdy Canuck

2 года назад

4,769 Просмотров

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


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

Djamel Dahmoun
Djamel Dahmoun - 06.10.2023 21:39

Thanks for this video and good explanation.

I have a question, what if 'useFetch' can fetch both objects (one record) and arrays ? what will be the generic definition of the useFetch hook ?

Ответить
Andrey Arhipov
Andrey Arhipov - 28.09.2022 09:50

Nice explanation, thanks ^_^

Ответить
Dario Macedo
Dario Macedo - 30.08.2022 23:39

Canuck this is so freaking amazing, thank you so much for such a great explanation, I really appreciate it! Please keep doing educational videos with TS, you have the magic to explain.

Ответить
Cliff V. Bajo
Cliff V. Bajo - 09.08.2022 03:18

This is a really great example, thank you. One question though..why did you put comma after the 'T' in the Generic declaration of 'useFetch' in 'useFetch.ts' ?

Ответить
Blaine Koch
Blaine Koch - 10.05.2022 13:40

ᵖʳᵒᵐᵒˢᵐ 😁

Ответить
marks
marks - 04.05.2022 05:50

I just come here to listen to your voice. Also it's pronounced data

Ответить
IgDzTV
IgDzTV - 04.05.2022 04:37

Yes!

Ответить
paritosh batish
paritosh batish - 06.04.2022 17:28

Should we return the data in JSON form or in array form? Example :-

(I also want to return the error if occured)
1) const { data, loading, error } = useFetch();
2) const [data, loading, error] = useFetch();

Is there a convention or good pattern on which to use?

Ответить
Todd Dunning
Todd Dunning - 05.04.2022 20:15

Super clear, better than the other guys like Traversy

Ответить
TESKO
TESKO - 05.04.2022 08:11

cool stuff! great explanation

Ответить