Wieldy
Wieldy is an alternative to using Redux. It makes everything a lot easier!
Installation
Use the package manager NPM to install Wieldy.
npm i wieldy
Usage
;...// Create your action typesconst LOGIN_REQUEST = 'LOGIN_REQUEST'...// Create your reducers with initial stateconst INITIAL_STATE = login: isFetching: false isAuthenticated: false formErrors: null ; { }...// Create the store with your reducersconst reducers = Auth ;;...// Dispatch inside the actionsconst handle_LoginRequest = { ;};...// Wrap your main APP inside the Provider { return <Provider> <MyComponent /> </Provider> ;}...// Connect your components { return <div> <h1>Login</h1> <h2>propsstateisFetching</h2> <button onClick=handle_LoginRequest>Request Login</button> </div> ;} state: stateAuthlogin MyComponent;...// Subscribe to trigger a callback on state changeconst Unsubscribe = // Callback gets the state as an argument...// You can also call GetState() manually to get the complete State
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.