Configuring useReducer with redux-devtools and thunk actions.
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...
blog.nishan.dev5 min read