filmov
tv
How to use the useReducer Hook - Better than useState for managing objects, arrays or complex data

Показать описание
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
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
Learn useReducer In 20 Minutes
Learn React Hooks: useReducer - Simply Explained!
Learn React useReducer Hook with Examples
useReducer is BETTER than useState | React Hook useReducer Tutorial
React Hooks Tutorial - 18 - useReducer Hook
How to use the useReducer Hook - Better than useState for managing objects, arrays or complex data
How to use React useReducer hook in your React applications
How to use the useReducer hook
handling from use useReducer Hook #code #logic #webdevelopment #programming #css #react
10 React Hooks Explained // Plus Build your own from Scratch
React Hooks Tutorial - 22 - useReducer with useContext
React Hooks useReducer Tutorial
A cure for React useState hell?
How to Use the useReducer Hook in React (with Examples) | #webdevelopment #reactjs
React Hooks Tutorial - 25 - useState vs useReducer
Use Reducer Hook | React Js Tutorial For Beginners | #13
How to use useReducer() in 2021 | ReactJs Hooks the easy way
How to use and understand useReducer() with useContext() - Code Quickie #8
Learn useReducer React Hook in 15 Minutes | React Hooks Tutorial for Beginners
useContext with useReducer React Hooks Crash Course
React Hook - How to use useReducer / Reducer Hook
React Context & Hooks Tutorial #19 - Reducers, Actions & State
How to use and understand useReducer() - Code Quickie #6
React Hooks - useContext & useReducer
Комментарии