Reading notes about code for my future reference.
We can utilize the useReducer hook!!!
useReducer hook is more for more complex logic. Than having a simple value like when you have to use the useState Hook.
Inside the constructor or directly inside the class.
It takes in the intial value for state and it utilizes the reducer function.
Just like the useState hook, the useReducer hook returns an array.
It allows you to pass in a group of data and it represents what action we want to use for them. It tells the reducer what to do which is essentially to update state.