tooot/src/screens/Compose/utils/createContext.ts

11 lines
298 B
TypeScript

import { createContext, Dispatch } from 'react'
import { ComposeAction, ComposeState } from './types'
type ContextType = {
composeState: ComposeState
composeDispatch: Dispatch<ComposeAction>
}
const ComposeContext = createContext<ContextType>({} as ContextType)
export default ComposeContext