@bunnix/redux
v0.10.0
Published
Global state management framework built for Bunnix
Readme
bunnix-redux
Bunnix Redux: global state management framework built for Bunnix.
Install
npm install @bunnix/reduxUsage
import { createStore } from '@bunnix/redux';
const counter = createStore(0, {
increment(state) {
return state + 1;
}
});
counter.increment();Bunnix bindings
store.state is a Bunnix State, so it can be used directly in views and props.
import { createStore } from '@bunnix/redux';
const counter = createStore(0, {
increment(state) {
return state + 1;
}
});
// Example Bunnix usage
const view = () => (
<div>
<button onclick={() => counter.increment()}>+</button>
<span>{counter.state}</span>
</div>
);Built for Bunnix.
