# react-react

> The best state management toolkit for react

Latest version **1.19.5** (published 2025-01-08) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.19.5 |
| Published | 2025-01-08 |
| First published | 2018-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Eugene Tihonove |
| Maintainers | tihonove |
| Keywords | react, state management |

## Links

- npm: https://www.npmjs.com/package/react-react
- Repository: https://github.com/tihonove/react-react
- Issues: https://github.com/tihonove/react-react/issues
- npm.io page: https://npm.io/package/react-react

## 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.19.5 (latest) — 2025-01-08
- 1.19.4 — 2025-01-08
- 1.2.0 — 2019-03-19
- 1.1.3 — 2018-02-26
- 1.1.2 — 2018-02-26
- 1.1.1 — 2018-02-26
- 1.1.0 — 2018-02-26
- 1.0.1 — 2018-02-26
- 1.0.0 — 2018-02-23

## README

# react-react &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/tihonove/react-react/blob/master/LICENSE) [![npm](https://img.shields.io/npm/v/react-react.svg?style=flat-square)](https://www.npmjs.com/package/react-react) [![Coveralls github](https://img.shields.io/coveralls/github/tihonove/react-react.svg?style=flat-square)](https://coveralls.io/github/tihonove/react-react) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/tihonove/react-react/pulls)

Impressive state management toolkit for React 🚀

### Pros
* Easy to use 😃
* Easy to read and maintain 📚
* Full hooks support 🪝
* React Server Components support 🌐
* Easy to get started with 🏁
* Fully compatible with React ⚛️
* Small size 🪶
* Flow and TypeScript support 💻
* [100% test coverage](https://coveralls.io/github/tihonove/react-react) ✅

### Installation

```bash
yarn add react-react
```

or 

```bash
npm install react-react
```

### How to use

First, create a component:

```javascript
import * as React from "react";

class MyComponent extends React.Component {
    // ...existing code...
}
```

To set state, use the `setState` function. For example:

```javascript
foo() {
    this.setState({ bar: "value" })
}
```

Access the state via the `state` field:

```jsx
render() {
    return <div>{this.state.bar}</div>
}
```

To use the library, add the following import at the beginning of your file:

```javascript
import "react-react";
```

### Usage with hooks

Create a functional component:

```jsx
import React, { useState } from 'react';

function MyComponent() {
    // ...existing code...
}
```

Add the `useState` hook:

```jsx
function MyComponent() {
    const [value, setValue] = useState("value");
    return <div>{value}</div>;
}
```

To update `value`, use `setValue`:

```jsx
function foo(newValue) {
    setValue(newValue);
}
```

### Conclusion

Now you're ready to manage state like a pro! 🎉 Happy coding! 💻

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