react-eventmanager
v0.0.3
Published
An Event Manager implementation for React
Downloads
3
Maintainers
Readme
React-EventManager
What is the React-EventManager?
React-EventManager is an alternative method of handling states on React views.
Quick start
Execute npm install react-eventmanager
to install react-eventmanager and its dependencies into your project directory.
Usage
import eventManager from 'react-eventmanager';
@eventManager.subscription({
sessionChanged: 'onSessionChanged'
})
class SampleContainer extends React.Component {
constructor() {
super();
this.state = {
user: {
name: 'User-1'
}
};
}
onSessionChanged(user) {
console.log(user);
this.setState({
user: user
});
}
render() {
return (
<div>
{this.state.user.name}
</div>
);
}
}
Todo List
See GitHub Projects for more.
Requirements
- node.js (https://nodejs.org/)
License
Apache 2.0, for further details, please see LICENSE file
Contributing
See contributors.md
It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome.
- To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
- To report a bug: If something does not work, please report it using GitHub Issues.