You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
639 B

3 years ago
import { createContext } from 'react'
import type { Action, AnyAction, Store } from 'redux'
import type { Subscription } from '../utils/Subscription'
export interface ReactReduxContextValue<
SS = any,
A extends Action = AnyAction
> {
store: Store<SS, A>
subscription: Subscription
getServerState?: () => SS
}
export const ReactReduxContext =
/*#__PURE__*/ createContext<ReactReduxContextValue>(null as any)
export type ReactReduxContextInstance = typeof ReactReduxContext
if (process.env.NODE_ENV !== 'production') {
ReactReduxContext.displayName = 'ReactRedux'
}
export default ReactReduxContext