ezmodel
simplifies web application state management. It provides a clear API for both local and global states, making your code cleaner and more maintainable.
Using npm
npm i ezmodel
Using yarn
yarn add ezmodel
Wrap components with view()
, define states with model()
and using effect()
to detect model change.
import { model, effect } from "ezmodel";
import { view } from "ezmodel/react";
const counter = model({ count: 0 });
effect(() => {
console.log("count", counter.count);
});
const App = view(() => (
<button onClick={() => counter.count++}>{counter.count}</button>
));
- Ease of Use: Straightforward setup.
- Reactivity: Seamless state-to-UI binding.
- Performance: Optimized for efficiency.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, discussions, or contributions, please join our community:
- GitHub Issues: For reporting bugs or requesting new features, please use GitHub Issues.
- Discussions: Join the conversation and ask questions in GitHub Discussions.
- Contribute: Contributions are welcome! If you're interested in contributing, please read our CONTRIBUTING guide for more information on how to get started.
Stay connected and help improve ezmodel
by sharing your feedback and ideas with the community!