How to use the useReducer Hook - Better than useState for managing objects, arrays or complex data
Автор: Kodie
Загружено: 2022-10-09
Просмотров: 984
Описание:
React JS Tutorial - useReducer
You probably use the useState hook in every app, but did you know that in many cases the useReducer hook is even better!
Whether you're storing arrays, objects or just have conditions to apply to your state, the useReducer hook take a function as its first argument to allow you to play with the data before storing to the state.
Once you learn useReducer, you'll find yourself using it again and again.
00:00 - Introduction
00:30 - useState example
01:22 - converting to useReducer
03:35 - Setting a reducer function
05:10 - useReducer to condition data
07:35 - Switch Case to set the state data
08:47 - Summary
#ReactJS #reactuseReducer #useReducer
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: