Allows you to pass dispatch down to components instead of callbacks
useCallback
Returns a memorized callback
Used to keep the ref of the function the same between renders unless a value in the dependency array changes.
useMemo
Returns a memorized value
That's all folks. It just saves you from recomputing something unless on of the values in the dependencies array changes. It is purely for performance.
useRef
Holds a mutable value
Often the value is a component like
But it can also be used to keep around mutable values similar to how you would use fields in classes.
useLayoutEffect
Same as useEffect but fires synchronously after all DOM mutations. Not often used.
useReducer
useState
dispatch
methoduseState
fordispatch
down to components instead of callbacksuseCallback
useMemo
Returns a memorized value
That's all folks. It just saves you from recomputing something unless on of the values in the dependencies array changes. It is purely for performance.
useRef
useLayoutEffect
Same as
useEffect
but fires synchronously after all DOM mutations. Not often used.