1.0.76 • Published 8 years ago
nexustate-react v1.0.76
Description
This package is used to manage state in react using nexustate
Basic Usage
install
npm install --save nexustate-react
use
import { withNexustate } from 'nexustate-react';
import React, { Component } from 'react';
class ExampleComponent extends Component {
componentWillMount() {
this.props.nexus.listen({ key: 'example', initialLoad: true });
}
randomExample = () => {
this.props.nexus.setKey('example', '' + (Math.random() * 100));
}
render() {
const { example } = this.props.data;
return (
<div>
<div>{example}</div>
<button onClick={this.randomExample}>Randomize</button>
</div>
);
}
}
export default withNexustate(ExampleComponent);1.0.76
8 years ago
1.0.75
8 years ago
1.0.74
8 years ago
1.0.73
8 years ago
1.0.72
8 years ago
1.0.71
8 years ago
1.0.70
8 years ago
1.0.69
8 years ago
1.0.68
8 years ago
1.0.67
8 years ago
1.0.66
8 years ago
1.0.65
8 years ago
1.0.64
8 years ago
1.0.63
8 years ago
1.0.62
8 years ago
1.0.61
8 years ago
1.0.60
8 years ago
1.0.59
8 years ago
1.0.58
8 years ago
1.0.57
8 years ago
1.0.56
8 years ago
1.0.55
8 years ago