Which of the following hooks is not used to manage state in functional components?
I am trying to understand the different hooks in React and their purposes. I came across the following hooks and I am not sure which one is not used to manage state in functional components:
useReducer
useState
useEffect
useMemo
From my understanding:
useReducer is used for managing complex state logic.
useState is used for adding state to functional components.
useEffect is used for performing side effects such as data fetching and subscriptions.
useMemo is used for memoizing expensive calculations.
Can someone confirm if my understanding is correct and which of these hooks is not used for managing state? Please provide the answer along with a valid reason. Thank you!
Saud Sana ullah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.