Tag: Hooks

0

Custom hooks

Where to use With custom Hooks, component logic can be extracted into reusable functions. React Hooks means that components should be written as pure functions as much as possible. If external funct

0

useEffect

useEffect() side effects Pure functions can only perform data calculations. Where should operations that do not involve calculations (such as generating logs, storing data, changing application stat

0

useState

Basic usage 1const [count, setCount] = useState(initialState) count is to read state, setCount is to update state, and initialState is initial value. ​ State is an array Because React renderin