0.0.1 • Published 3 months ago
mixtore v0.0.1
mixtore
(Mini Store)
Introduction
Mixtore is an effective library for state management, equipped with two functions and two principles:
- Consistently encase your components within
view()
. - Consistently encase your state store objects within
store()
.
import React from "react";
import { store } from "mixtore";
import { view } from "mixtore/react";
const counter = store({ count: 0 });
const App = view(() => (
<button onClick={() => counter.count++}>{counter.count}</button>
));
This ensures automatic view updates as required. The structure or mutation of your state stores is irrelevant; any syntactically correct code is effective.
Installation
NPM
npm i mixtore
YARN
yarn add mixtore