All React Hooks
Let's try to study all react hooks you gonna face
useState
re-render is the key when things change. You can not change the value directly so have to use it with the function(setSth) in useState to mutate.
useReducer
function reducer() {
return {...} // return a new state while keeping immutability
}