rScopes
Flexible State management system based on flux architecture, stores data components & inheritable scopes
rScopes What ?
RS is a flexible state management system inspired by ReactJS methods.
Quickly said, RS allow linking, scoping, and sequencing of multiples redux-like, async-able, stores while remaining in a serializable flux architecture.
RS is semantically and operationally stable; it does the work and have a coherent semantic system.
That said, it wasn't wrote with perf or perfect code as priority, but to manage states & async problematics in a intuitive & modular way.
here
Minimal docWhat's it like?
Here some conceptual basics :
import React from "react";import asRef asScope asStore withScope withStateMap propsToScope scopeToProps from "rscopes";import MyComplexStore from "./from/somewhere"; // withScope will instantiate a dedicated scope when using this React Component// it will inherit the scope & actions from the parents React Elements@// this will connect any changes of props.workerId to BrainScope.workMachine.workerId@// this will bind the result data of Manager to props.Manager// * Store are recursively instantiated when referenced & are destroyed when listeners are removed@Component //...
About decorators
( well, like code-decorators )
These are stage-0 decorators because while the decorators spec has changed and is now stage-2, no transpiler has yet to implement these changes and until they do, this library won't either. Although the TypeScript documentation uses the phrase "Decorators are a stage 2 proposal for JavaScript" this is misleading because TypeScript still only implements the stage-0 version of the spec, which is very incompatible with stage-2 (as of this writing). If you concretely find that a compiler (babel, TS, etc) implement stage-2+, please do link me to the appropriate release notes! 🎈
This can be consumed by any transpiler that supports stage-0 of the decorators spec, like babel.js version 5. Babel 6 does not yet support decorators natively, but you can include babel-plugin-transform-decorators-legacy or use the applyDecorators()
helper.
Related packages
rScopes link the following packages :
ReScope : rescope
React HOCs, decorators & tools : react-rescope
ReScope HOCs, decorators & tools : rescope-spells
Samples & bootstraps
The examples and bootstrap will come gradually here