fluxless
v0.2.6
Published
Fluxless is a state manager for react for any kind of project. It is based at observable pattern and uses react context for providing the store
Maintainers
Readme
Fluxless core
Philosophy
const counterSlice = new Slice(
{ count: 0 },
{ increment: (state: number, n: number) => state + n }
);
const store = new Store({ counter: counterSlice });
const slice = store.getSlice("counter");
const current = slice.getState("count").get();
slice.useAction("count", "increment", current, 5);
console.log(slice.getState("count").get()) //will be 5