Releases: doniyor2109/redux-lightweight
Releases · doniyor2109/redux-lightweight
1.1.0
v1.0.0
Initial official release of redux-lightweight 🎉 🎉 🎉
Now we use classes as our base working model for reducers.
You can declare your reducer and its actions in one class like this:
class Counter {
state = 1
increment(amount) {
return this.state + amount
}
}
Then redux-lightwieght
generate actions and reducers for you.
It is basically designed to working with redux.
Support for Hooks
Moreover it has support for hooks which is awesome. Using redux-lightweight
with hooks is very easy and it has only one API for that.
function App() {
const [counter, { increment }] = useUpdater(Counter)
function handleClick() {
increment()
}
return (
<>
{counter}
<button onClick={handleClick}>Increment</button>
</>
)
}