Hooks
UseDispatch Hooks can only be called inside the body of a function component.
The useDispatch hook is a React hook that can only be used inside of a function component. It allows you to access the dispatch function from the Redux store, which you can use to dispatch actions to update the state of your application. It is a way to “hook” into the Redux store and update…