Closed ghost closed 5 years ago
redux-observable
actions
import { createAsyncAction } from 'typesafe-actions'; export const fetchNavBarAsync = createAsyncAction( 'FETCH_NAVBAR_LIST_REQUEST', 'FETCH_NAVBAR_LIST_SUCCESS', 'FETCH_NAVBAR_LIST_FAILURE', 'FETCH_NAVBAR_LIST_CANCEL' )<string, any[], Error, string>();
import { useSelector, useDispatch } from 'react-redux'; const dispatch = useDispatch(); dispatch(fetchNavBarAsync.request);
How can I use it react hooks
Try with
dispatch(fetchNavBarAsync.request('foo'));
Thank you
redux-observable
actions
How can I use it react hooks