w3-redux
Version:
redux and redux thunk tools
42 lines (41 loc) • 3.23 kB
TypeScript
import { Options, Reducers } from "./types";
export declare const createStore: (reducers: Reducers, options: Options) => import("redux").Store<import("redux").EmptyObject, import("redux").AnyAction> | {
getServerSideProps: <P extends {} = any>(callback: import("next-redux-wrapper").GetServerSidePropsCallback<import("redux").Store<import("redux").EmptyObject, import("redux").AnyAction>, P>) => import("next").GetServerSideProps<P, any, import("next").PreviewData>;
getStaticProps: <P_1 extends {} = any>(callback: import("next-redux-wrapper").GetStaticPropsCallback<import("redux").Store<import("redux").EmptyObject, import("redux").AnyAction>, P_1>) => import("next").GetStaticProps<P_1, any, import("next").PreviewData>;
getInitialAppProps: <P_2 extends {} = any>(callback: import("next-redux-wrapper").AppCallback<import("redux").Store<import("redux").EmptyObject, import("redux").AnyAction>, P_2>) => ({ Component, ctx }: import("next/app").AppContext) => Promise<import("next/app").AppInitialProps & {
pageProps: P_2;
}>;
getInitialPageProps: <P_3 extends {} = any>(callback: import("next-redux-wrapper").PageCallback<import("redux").Store<import("redux").EmptyObject, import("redux").AnyAction>, P_3>) => ((context: import("next").NextPageContext<any>) => any) | undefined;
withRedux: (Component: any) => {
new (props: any, context: any): {
store: import("redux").Store<import("redux").EmptyObject, import("redux").AnyAction>;
hydrate({ initialState, initialProps, ...props }: any, context: any): void;
shouldComponentUpdate(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
render(): JSX.Element;
context: any;
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly<any> & Readonly<{
children?: any;
}>;
state: Readonly<any>;
refs: {
[key: string]: import("react").ReactInstance;
};
componentDidMount?(): void;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
};
displayName: string;
getInitialProps: any;
contextType?: import("react").Context<any> | undefined;
};
};