Impressive state management toolkit for react
- Easy to use
- Easy to read and maintain
- Low barrier to entry
- Full react compatible
- Small size
- Flow and Typescript support
- 100% test coverage
yarn add react-react
or
npm install react-react
First you should create component:
import * as React from "react";
class MyComponent extends Component {
}
To set state use setState
function. For example
foo() {
this.setState({ bar: "value" })
}
Access to state via state
field:
render() {
return <div>{this.state.bar}</div>
}
To use library just add following import to the beginning of you file:
import "react-react";