import React, { useDispatch } from 'reactn'; // <-- reactn const incrementReducer = (global, dispatch, action) => ({ count: global.count + action.amount, }); const decrementReducer = (global, dispatch, action) => ({ count: global.count - action.amount, }); const MyComponent = () => { const increment = useDispatch(incrementReducer); const decrement = useDispatch(decrementReducer); return (