{"repo":"pedronauck/reworm","free":true,"listed":false,"github":"https://github.com/pedronauck/reworm","clone":"git clone https://github.com/pedronauck/reworm.git","description":"🍫 the simplest way to manage state","language":"TypeScript","stars":1459,"topics":["react","state-management","redux","state","react-context"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"🧐 &nbsp; Why? Forget about actions, connections, reducers and a lot of boilerplate to create and manage states. With reworm you can create and manage state as simple as on the image above. Todo List Example 💻 &nbsp; Install and Usage Install reworm using your package manager Then just wrap your app with our Provider , create your new state and use it! Change your state easily Instead of defining actions or something else to change your state, with reworm you just need to use the set method like that: Using selectors Selectors are good because they prevent you from duplicating code. With it you can just create some functions and use them throughout your application. Listening state changes If you want to listen changes on your state you can use subscribe() : 🔎 &nbsp; API create (initial?: T): State Create a new state get((state: T) = React.ReactNode) Use this method to access your state set((state: T (prevState: T) = T) = T) Use this method to set your state select (selector: (state: T) = S) = (fn: GetFn ) = React.ReactNode Create selectors that can be used with your state and avoid repeating code. subscribe: (fn: SubscribeFn ) = () = void Use this method to listen state changes 📝 &nbsp; Typings 🕺 &nbsp; Contribute If you want to contribute to this project, please see our Contributing Guide !","default_branch":null,"files":null,"tree":[],"storefront":"/r/pedronauck","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pedronauck/reworm/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."}