react class component redux get state useSelector code example Example: useDispatch() useDispatch({ type: '', playload });