# react-pure-stateless

> HoC to make your React stateless component real pure.

Latest version **1.0.1** (published 2016-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-pure-stateless
pnpm add react-pure-stateless
yarn add react-pure-stateless
bun add react-pure-stateless
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-02-27 |
| First published | 2016-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Corentin Kerisit |
| Maintainers | cerisier |
| Keywords | react, pure, stateless, component, hoc |

## Links

- npm: https://www.npmjs.com/package/react-pure-stateless
- Repository: https://github.com/cerisier/react-pure-stateless
- Homepage: https://github.com/cerisier/react-pure-stateless#readme
- Issues: https://github.com/cerisier/react-pure-stateless/issues
- npm.io page: https://npm.io/package/react-pure-stateless

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-02-27
- 1.0.0 — 2016-02-26

## README

# react-pure-stateless

HoC to make your React stateless component real pure.

This is a simple general helper to get around stateless components not being strictly speaking pure;
Given the same props, it still renders everytime.

See [facebook/react#5677](https://github.com/facebook/react/issues/5677)

This high order component leverages the [react-pure-render](http://github.com/gaearon/react-pure-render) module to wrap
your stateless component into a class component with pure shouldComponentUpdate behavior.

# Installation

Install via npm, note that you will also need to install [react-pure-render](http://github.com/gaearon/react-pure-render).

```bash
npm install --save react-pure-stateless
```

# Usage

```javascript
var pureStateless = require('react-pure-stateless')

let MyPureComponent = pureStateless((props) => {
    return (...INSERT JSX HERE...)
})
```

NB: You should probably think twice before using this for every stateless component =)

# License

MIT

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