UNPKG

@reactivers/use-global-state

Version:

Global State in React with hooks and providers

14 lines (10 loc) 345 B
import { useGlobalStateContext } from './context'; interface IUseGlobalState { globalState: Record<string, any>; setGlobalState: any; } const useGlobalState: () => IUseGlobalState = () => { const { globalState, setGlobalState } = useGlobalStateContext() return { globalState, setGlobalState } } export default useGlobalState;