A fast lightweight alternative to MobX-State-Tree + Y.js two-way binding
npm install mobx-bonsai
A fast lightweight alternative to MobX-State-Tree + Y.js two-way binding
mobx-state-tree that combines the simplicity of plain data with the power of MobX reactivity. Unlike mobx-state-tree, tree nodes in mobx-bonsai are always plain data objects with no embedded methods, getters, or setters. Instead, all interactions are managed via external functions—getters and MobX actions like embracing a more functional approach, thus improving performance and memory usage. Your application state remains a simple, observable plain object. Instead of modifying the nodes directly with object methods, you work with pure functions that inspect or update the state, ensuring clarity and reproducibility.
mobx-bonsai, you get:
mobx-bonsai uses MobX behind the scenes, it integrates seamlessly with mobx and mobx-react.
Y.js state trees and mobx-bonsai reactive trees available via the mobx-bonsai-yjs package.
npm install mobx-bonsai
yarn add mobx-bonsai
npm install mobx-bonsai-yjs yjs
yarn add mobx-bonsai-yjs yjs