react-react ·
Impressive state management toolkit for react
Pros
- Easy to use
- Easy to read and maintain
- Full hooks support
- Low barrier to entry
- Full react compatible
- Small size
- Flow and Typescript support
- 100% test coverage
Installation
yarn add react-react
or
npm install react-react
How to use
First you should create component:
; Component
To set state use setState
function. For example
{ this}
Access to state via state
field:
{ return <div>thisstatebar</div>}
To use library just add following import to the beginning of you file:
;
Usage with hooks
Create a functional component
import React from 'react' { }
Add useState
hook
{ const value setValueState = return <div>value</div>}
To update value
use setValueState
{ }