UNPKG

reactive-react-redux

Version:

React Redux binding with React Hooks and Proxy

12 lines (9 loc) 257 B
import { useContext } from 'react'; import { defaultContext } from './Provider'; export const useDispatch = (opts = {}) => { const { customContext = defaultContext, } = opts; const { dispatch } = useContext(customContext); return dispatch; };