I'm new to typescript and I was implementing react useContext and useReducer. I was following a tutorial but im getting an error of Parameter 'action' implicitly has an 'any' type. In my reducer function.
reducer function
function reducer(state, action) { // error Parameter 'action' implicitly has an 'any' type.
return { count: state.count + 1 }
}
CountProvider
const [state, dispatch] = useReducer(reducer, {
count: 0
})