How to build Custom Hooks in React

How to build Custom Hooks in React

Jason Rivera

5 лет назад

7,088 Просмотров

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


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

@FourTwentyMagic
@FourTwentyMagic - 03.04.2020 02:46

honestly, this was far more useful than any other video i've seen on useeffect or custom hooks. Props (hehe) to you!

Ответить
@Sillyvan
@Sillyvan - 27.04.2020 11:13

Honestly great tutorial

Ответить
@refanbanzhang
@refanbanzhang - 05.05.2020 15:47

nice work!

Ответить
@zlackbiro
@zlackbiro - 21.05.2020 23:27

Life saver video... even react documentation doesnt have this perfect way of custom Hooks with state inside to share multiple functions at once. Impressive!

Ответить
@blackpilledbuddha4944
@blackpilledbuddha4944 - 11.06.2020 12:43

do a video on using hooks to substitute hocs

Ответить
@rangabharath4253
@rangabharath4253 - 02.08.2020 17:11

awesome

Ответить
@MrEasyFlying
@MrEasyFlying - 12.10.2020 01:56

Great Video. Thanks.

Ответить
@CodingWithDapo
@CodingWithDapo - 04.11.2020 19:18

as little as it might seem, can you always upload these codes, they will be very helpful.

Ответить
@Metachief_X
@Metachief_X - 02.12.2020 07:23

bro, this tutorial was awesome!!

Ответить
@tobiokunuga5046
@tobiokunuga5046 - 07.03.2021 21:13

Wow!!! This video is a life saver man!!! Thank you for putting this up.

Ответить
@Mika4x
@Mika4x - 10.02.2022 21:34

Still, very helpful. Thank you.

Ответить
@davideforestali8558
@davideforestali8558 - 26.04.2022 12:27

what if I need to set a value both in the custom hook and the component where it's used?

I'm creating a custom hook for two components (a grocery list and a pantry list) that use the same logic for when an ingredient is edited.

part of this logic is setting the editing ingredient and the id of the ingredient processing (setEditingIngredient and setIngredientIdProcessing). Now, there are also needed inside each component (groceryList and Pantry), within logics that are not shared between them. For example, you can mark ingredients as checked (taken) in groceryList but not in Pantry.

how would I handle that?

Thanks

Ответить