22 - React and Spring Boot: Introduction of React Hooks, How to use useState and useEffect in React?

preview_player
Показать описание
#ReactHooks #useEffect #useState
=====================
=====================
What are React Hooks?
Hooks are a new addition in React 16.8, Hooks let us use state and other React features without writing a class.
Hooks are functions that you hook into React state and lifecycle features from function components.
If you are writing a function component and then you want to add some state to it, previously you do this by converting it to a class component. but now you can do it by using the Hook inside the function component with the help of useState.
Hooks doesn’t work inside the class component.

#useState
The State hook, We call it inside a function component to add some local state to it.

#useEffect
The Effect hook, adds the ability to perform side effects from a function component.
The Effect hook, serves the same purpose as #componentDidMount, #componentDidUpdate, #componentWillUnmount in React classes, but unified into a single API.

Other type of hooks
#useContext, #useReducer, #useCallback, #useMemo, #useRef, #useImperativeHandle, #useLayoutEffect, #useDebugValue
Рекомендации по теме
Комментарии
Автор

Best of the best! When will you release the next video? It's too useful!

OptimistRealist
Автор

Hello Bro, we are waiting for the next video!!!

OptimistRealist
Автор

Waiting for registration! And maybe also show how to implement Testing for Spring Boot ?

RENEGVDE
Автор

Can you describe the register function? It doesn't work

pavithramadhushini
welcome to shbcf.ru