@rtbjs/use-state
Version:
`@rtbjs/use-state` is a state management tool that can act as a local state and be easily turned into a global redux state. It is an innovative approach to state management that combines the advantages of both React's useState and Redux's state management
10 lines (9 loc) • 388 B
TypeScript
import * as React from 'react';
import { Action, ModalsState } from './draggableModalReducer';
export interface DraggableModalContextMethods {
dispatch: (action: Action) => void;
}
export interface DraggableModalContextValue extends DraggableModalContextMethods {
state: ModalsState;
}
export declare const DraggableModalContext: React.Context<DraggableModalContextValue | null>;