microstates-todomvc

1.0.0-beta.18 • Public • Published

TodoMVC Model

This package provides a model for TodoMVC App Components. The goal of this package is to show how a single state model can be consumed by different frameworks without modifying original model.

How it works?

For each framework, a connect utility wraps a component and binds the TodoMVC Model to the root component. The connect utility makes model and actions available to the wrapped component. model contains state for the current value. actions are state transitions wrapped in framework specific code that'll cause the component to update.

Where to look

Notable

No framework specifc state management

Microstates was created to normalize how state transitions are performed across frameworks. For most cases, the model provides all state and actions necessary to track state of the component. Framework specific state management is only necessary when storing local component state that is disposable. For example, and input field might store the current user input locally to prevent the model from being transitioned on every keystroke.

Readme

Keywords

Package Sidebar

Install

npm i microstates-todomvc

Weekly Downloads

16

Version

1.0.0-beta.18

License

MIT

Last publish

Collaborators

  • taras