I am studying redux. I came across with useSelector hook that takes a callback function. The parameter of the callback function is the state of the store. My question here is how simply importing useSelector hook from react-redux enables the parameter of the callback function equivalent to the state of the store? Where is the connection between that parameter and the store?
Example
import { useSelector } from 'react-redux'
export const CounterComponent = () => {
const counter = useSelector((state) => state.counter)
return <div>{counter}</div>
}