# 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.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-side-effect/index.d.ts)
````ts
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](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [Remo H. Jansen](https://github.com/remojansen), and [Martin Charles](https://github.com/0xcaff).
