useselector hook inside the function code example Example: useDispatch() useDispatch({ type: '', playload });