{"repo":"unadlib/usm","free":true,"listed":false,"github":"https://github.com/unadlib/usm","clone":"git clone https://github.com/unadlib/usm.git","description":"🏖 A concise & flexible state model for Redux/MobX/Vuex/Pinia, etc.","language":"TypeScript","stars":300,"topics":["redux","mobx","vuex","angular","usm","mutative","pinia"],"license":"MIT","category":"ui-components","readme_excerpt":"USM USM is a universal state modular library, supports Redux(5.x), MobX(6.x), Vuex(4.x+), Pinia(3.x) and Angular(2.0+). Motivation usm provides a generic state model that is class-first, which help us to be OOP at almost no cost and is compatible with the ecology of every state library. When you don't want to learn the paradigm of any state library, usm can help you use any state library. When your project's business code is based on usm , the architecture will be more flexible. Support Libraries/Frameworks None/Angular2+ Redux MobX Vuex Pinia :--------------------------------------------------------- :--------------------------------------: :---------: :--------: :--------: :---------: Package Name usm usm-redux usm-mobx usm-vuex usm-pinia Integrated Mutative ✅ ✅ 🚫 🚫 🚫 State Type Immutable Immutable Observable Observable Observable Installation To install usm : And if you want to use Redux/MobX/Vuex/Pinia, you just install usm-redux / usm-mobx / usm-vuex / usm-pinia . Usage - Use @state to decorate a module state. - Use @action to decorate a module method for state changes. - Use createStore to create a store. Examples - React - Vue APIs @state Define a shared state for a module, and you can use @state for decoration. When use usm-redux , the state is not allowed to be undefined . For example, @action All operations that change state must be in a method decorated by @action . For example, @computed/@computed() It is used for computing derived data. When use usm-mobx , usm","default_branch":null,"files":null,"tree":[],"storefront":"/r/unadlib","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/unadlib/usm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}