Installation
npm install --save @types/react-side-effect
Summary
This package contains type definitions for react-side-effect (https://github.com/gaearon/react-side-effect).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-side-effect.
import * as React from "react";
interface WithSideEffect {
<TProp, TState>(
reducePropsToState: (propsList: TProp[]) => TState,
handleStateChangeOnClient: (state: TState) => void,
): ClassDecorator<TProp, TState, TState>;
<TProp, TState, TServerState>(
reducePropsToState: (propsList: TProp[]) => TState,
handleStateChangeOnClient: (state: TState) => void,
mapStateOnServer: (state: TState) => TServerState,
): ClassDecorator<TProp, TState | TServerState, TServerState>;
}
declare const withSideEffect: WithSideEffect;
type ClassDecorator<TProp, TPeek, TRewind> = (
component: React.ComponentType<TProp>,
) => React.ComponentType<TProp> & {
peek: () => TPeek;
rewind: () => TRewind;
};
declare namespace withSideEffect {} // https://github.com/Microsoft/TypeScript/issues/5073
export = withSideEffect;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/react
Credits
These definitions were written by Remo H. Jansen, and Martin Charles.