I have created a login component, and there is a state Auth with redux
that and reducer to update the Auth state (initally it is set as FALSE)
but on initial render dispatch is called 4 times and state is updated to TRUE
i have tried useMemo, but not sure how exacltly use it.
https://codesandbox.io/s/react-reducer-ijhj5?file=/src/Components/LoginComponent.js