The screenshot below is taken from the Maximilian Schwarzmüller's Udemy Course "React - The Complete Guide (incl Hooks, React Router, Redux)"
When using useSelector to access some part of the state, it is not obvious where the state is being passed in. In the screenshot below, Max executes useSelector to access the cartIsVisible method of the ui reducer - but how does he get access to the state itself? Since the useSelector is just a hook taken from react-redux and there is nothing else passed in, how does he have access to state? When I tried to console.log(state) it shows an error that state is not defined.
