UNPKG

@reactseed/use-redux

Version:

Use redux to drive state with a React hooks

17 lines (16 loc) 418 B
/** * Take state as a parameter, return method and state */ export interface Transitions<T, M> { (state: T): M; } /** * useRedux * @see {@link https://github.com/immerjs/use-immer/issues/10} * @param transitions: Transitions<T, M> */ declare const useRedux: <T, M>(transitions: Transitions<T, M>) => [T, M]; export default useRedux; export * from 'react-redux'; export * from 'redux'; export * from 'immer';