Extract Custom Hooks

preview_player
Показать описание
Just like components, Hooks can be composed and extracted.

When it's time to extract a Hook, we just create a new function that returns data.

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

Does usePokemon return null the first time? useEffect is executed asynchronously so the return statement will return the pokemon's initial value, right?

esteban