All Projects → wix → mutable

wix / mutable

Licence: other
State containers with dirty checking and more

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to mutable

Mobx Keystone
A MobX powered state management solution based on data trees with first class support for Typescript, support for snapshots, patches and much more
Stars: ✭ 284 (+787.5%)
Mutual labels:  state-management, mobx, functional-reactive-programming, frp
vuex-but-for-react
A state management library for React, heavily inspired by vuex
Stars: ✭ 96 (+200%)
Mutual labels:  flux, state-management, state
Mobx Rest
REST conventions for Mobx
Stars: ✭ 164 (+412.5%)
Mutual labels:  state-management, mobx, state
Reatom
State manager with a focus of all needs
Stars: ✭ 567 (+1671.88%)
Mutual labels:  flux, state-management, state
Mobx State Tree
Full-featured reactive state management without the boilerplate
Stars: ✭ 6,317 (+19640.63%)
Mutual labels:  state-management, mobx, observable
Datx
DatX is an opinionated JS/TS data store. It features support for simple property definition, references to other models and first-class TypeScript support.
Stars: ✭ 111 (+246.88%)
Mutual labels:  state-management, mobx, model
temperjs
State management for React, made simple.
Stars: ✭ 15 (-53.12%)
Mutual labels:  flux, state-management, state
reactive state
An easy to understand reactive state management solution for Flutter.
Stars: ✭ 19 (-40.62%)
Mutual labels:  state-management, state, observable
Clean State
🐻 A pure and compact state manager, using React-hooks native implementation, automatically connect the module organization architecture. 🍋
Stars: ✭ 107 (+234.38%)
Mutual labels:  flux, mobx, state
Flooks
🍸 A state manager for React Hooks
Stars: ✭ 201 (+528.13%)
Mutual labels:  flux, model, state
okito
Your best flutter coding friend. All in one; state management, navigation management(with dynamic routing), local storage, localization, dependency injection, cool extensions with best usages and with the support of best utilities!
Stars: ✭ 37 (+15.63%)
Mutual labels:  state-management, state, class
Westore
更好的小程序项目架构
Stars: ✭ 3,897 (+12078.13%)
Mutual labels:  state-management, model, state
mst-effect
💫 Designed to be used with MobX-State-Tree to create asynchronous actions using RxJS.
Stars: ✭ 19 (-40.62%)
Mutual labels:  state-management, mobx, observable
Ngx Model
Angular Model. Simple state management with minimalistic API, one way data flow, multiple model support and immutable data exposed as RxJS Observable.
Stars: ✭ 137 (+328.13%)
Mutual labels:  state-management, model, data-flow
micro-observables
A simple Observable library that can be used for easy state management in React applications.
Stars: ✭ 78 (+143.75%)
Mutual labels:  state-management, mobx, observable
RxReduxK
Micro-framework for Redux implemented in Kotlin
Stars: ✭ 65 (+103.13%)
Mutual labels:  flux, state-management, state
Little State Machine
📠 React custom hook for persist state management
Stars: ✭ 654 (+1943.75%)
Mutual labels:  flux, state-management, state
realar
5 kB Advanced state manager for React
Stars: ✭ 41 (+28.13%)
Mutual labels:  model, observable, data-flow
agile
🌌 Global State and Logic Library for JavaScript/Typescript applications
Stars: ✭ 90 (+181.25%)
Mutual labels:  state-management, state, functional-reactive-programming
XUI
XUI makes modular, testable architectures for SwiftUI apps a breeze!
Stars: ✭ 100 (+212.5%)
Mutual labels:  state-management, state

Mutable

npm version

Mutable state containers in javascript with dirty checking and more (WIP)

What Mutable does

Mutable is a mobx-compatible class system library. Mutable offers a unique runtime schema engine that enforces unidirectional data flow, and formalizes the structure of props and state. Mutable also supports data defaults, and non-nullable types.

Using mutable

Add Mutable to your project by installing it with npm:

npm install mutable --save

Simple code example:

import * as mutable from 'mutable';
import * as mobx from 'mutable';

// define a mutable class by providing a name and a spec (class schema)
const Dude = mutable.define('Dude', {
    spec: ()=>({
        name: Mutable.String.withDefault('Leon'),
        age: Mutable.Number.withDefault(110),
        address: Mutable.String.withDefault('no address')
    })
});
 
// Mutable types accept custom data according to their spec as the first argument of their constructor
const dude = new Dude({name:'Ido'});

mobx.autorun(function () {
    console.log(dude.name + ' ' + dude.age);
});
// prints: Leon 110
dude.name = 'Mike';
// prints: Mike 110

Integrating mutable into React components is up to the user.

how to build and test locally from source

Clone this project locally. Then, at the root folder of the project, run:

npm install
npm test

how to run local continous test feedback

At the root folder of the project, run:

npm start

Then, open your browser at http://localhost:8080/webtest.bundle and see any changes you make in tests or code reflected in the browser

Versioning

Currently Mutable is in alpha mode. As such, it does not respect semver.

License

We use a custom license, see LICENSE.md

Similar Projects

These are examples of the kinds of libraries we would like to model ourselves after.

  • NestedTypes : High-performance model framework, which can be used as drop-in backbonejs replacement.
  • mobx : Simple, scalable state management
  • alt : A library that facilitates the managing of state within your JavaScript applications. It is modeled after flux.
  • immutable.js : Immutable persistent data collections for Javascript which increase efficiency and simplicity
  • cls.js : Easy, dynamic (kind of mixin) javascript classes
  • observable-value: Object representation of mutable value
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].