react-torch
Version:
A lib to server-side render with react.
16 lines (15 loc) • 625 B
TypeScript
import React from 'react';
import type { Params } from 'torch-router';
import type { History, Location } from 'torch-history';
import type { Context } from '../..';
import { StoreLike } from '../store';
export declare type GlobalContextType = {
location: Location;
history: History;
context: Context;
params: Params;
store: StoreLike<any>;
};
export declare const GlobalContext: React.Context<GlobalContextType>;
export default GlobalContext;
export declare const connectContext: (Component: React.ComponentType) => ({ location, history, context, params, store }: GlobalContextType) => () => JSX.Element;