@reffect/strict
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

reffect logo
npm npm bundle size license

Reffect — is a declarative and reactive multi-store state manager for JavaScript/TypeScript applications inspired by Reatom and Effector

@reffect/strict

Store middleware for Reffect

How to use

import { store, effect } from "@reffect/core";
import { strictUpdate } from "@reffect/logger";

const projectsStore = store({ projects: [] }, "projects", [strictUpdate]);

const setProjects = effect(projectsStore, "projects");
// ...

setProjects(["foo", "bar"]); // state of projectsStore will update to { projects: ["foo", "bar"] }
setProjects(["foo", "bar"]); // state of projectsStore won't update because new state and current are equals

Package Sidebar

Install

npm i @reffect/strict

Weekly Downloads

6

Version

0.0.1

License

MIT

Unpacked Size

10.1 kB

Total Files

10

Last publish

Collaborators

  • acacode