# telereact

> The most elegant state manager for React apps

Latest version **1.0.2** (published 2020-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install telereact
pnpm add telereact
yarn add telereact
bun add telereact
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-09-03 |
| First published | 2020-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 25.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | MiLeung |
| Maintainers | mileung |
| Keywords | react, redux, mobx, recoil, setState, elegant, state, management |

## Links

- npm: https://www.npmjs.com/package/telereact
- Repository: https://github.com/MiLeung/telereact
- Homepage: https://github.com/MiLeung/telereact#readme
- Issues: https://github.com/MiLeung/telereact/issues
- npm.io page: https://npm.io/package/telereact

## Alternatives

- [@reckona/mreact-store](https://npm.io/package/@reckona/mreact-store.md) — 976 weekly downloads
- [regular-state](https://npm.io/package/regular-state.md) — 410 weekly downloads
- [@pacote/flux-actions](https://npm.io/package/@pacote/flux-actions.md) — 65 weekly downloads
- [@pilotlab/lux-debug](https://npm.io/package/@pilotlab/lux-debug.md) — 39 weekly downloads
- [vue-persist-state](https://npm.io/package/vue-persist-state.md) — 19 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-09-03
- 1.0.1 — 2020-09-02
- 1.0.0 — 2020-09-01

## README

# telereact

> The most elegant state manager for React apps

[![NPM](https://img.shields.io/npm/v/telereact.svg)](https://www.npmjs.com/package/telereact) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install telereact
```

## Documentation

[telereact.com](https://telereact.com)

## Basic usage

```jsx
import { Provider, connect } from 'telereact';

const App = () => (
  <Provider initialState={{ a: 1, b: { c: 3, d: 0 } }}>
    <Router />
  </Provider>
);
// ...
const Container = ({ setState, a, b }) => (
  <div>
    <button onClick={() => setState({ a: a + 1 })} />
    <p>a: {a}</p>
    <button
      onClick={() =>
        setState(
          { b: { c: b.c + 1 } }, // This setState call will not change b.d
          { deepMerge: true }, // because the meta object has deepMerge: true
        )
      }
    />
    <p>b.c: {b.c}</p>
    <p>b.d: {b.d}</p>
  </div>
);
export default connect('a, b')(Container);
```

## License

MIT © [MiLeung](https://github.com/MiLeung)

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