diff options
Diffstat (limited to 'src/console/components/AppContext.ts')
-rw-r--r-- | src/console/components/AppContext.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/console/components/AppContext.ts b/src/console/components/AppContext.ts new file mode 100644 index 0000000..878d00b --- /dev/null +++ b/src/console/components/AppContext.ts @@ -0,0 +1,13 @@ +import React from "react"; +import { State, defaultState } from "../reducers"; +import { ConsoleAction } from "../actions"; + +const AppContext = React.createContext<{ + state: State; + dispatch: React.Dispatch<Promise<ConsoleAction> | ConsoleAction>; +}>({ + state: defaultState, + dispatch: () => null, +}); + +export default AppContext; |