# @types/react-side-effect

> TypeScript definitions for react-side-effect

Latest version **1.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-side-effect
pnpm add @types/react-side-effect
yarn add @types/react-side-effect
bun add @types/react-side-effect
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2023-11-07 |
| First published | 2016-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51378 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-side-effect
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-side-effect
- npm.io page: https://npm.io/package/@types/react-side-effect

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 1.1.4 (latest) — 2023-11-07
- 1.1.1 (ts2.8) — 2018-08-06
- 1.1.0 (ts2.6) — 2018-07-24
- 1.0.5 (ts2.3) — 2017-08-21
- 1.0.3 (ts2.1) — 2017-01-23
- 1.0.2 (ts2.0) — 2016-11-04
- 1.1.3 — 2023-10-18
- 1.1.2 — 2023-09-27
- 1.0.6 — 2018-02-12
- 1.0.4 — 2017-06-23
- 1.0.1 — 2016-10-26

## README

# 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).

---
_Source: https://npm.io/package/@types/react-side-effect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
