Creating a custom React useReducer hook to support passing functions as actions. import { useReducer } from 'react' function useReducerWithThunk(reducer, initialState) { const [state, dispatch] = useReducer(reducer, initialState); let customDi...

Markdown supported · ⌘↵ to post
No responses yet.