Comments (2)
another alternative would be to mark the mapped object as "dirty" and make the mapped object recalculate on "get" if dirty is true
from mobx-keystone.
@xaviergonz Regarding #519 (comment):
My point is about having the freedom to eliminate "recalculation" (from scratch). I am totally fine if 95% of my app works with recalculation (it's easier to reason about + simpler code), but that 5% must rely on deep observation and listening to deep changes and propagating these deep changes solely. Also, this part must be reactive and can not be passive. (Explicit mutation of mapped is not good enough, does not scale regarding DX.)
As onPatches
does not help inside of a transaction, my attempts was to treat actions like these changes events which "needs to be propagated". For that, I'd need the freedom to nest "onAction"s and as part of that, to emit new actions.
Just and idea: it would be nice if we could insert a callback (eg used with standaloneAction) before and especially after an action. So, beyond onStart
and onFinish
there could be a beforeStartStandaloneAction
and afterFinishStandaloneAction
- as sibling actions, respecting the boundaries.
However it would be also interesting something like afterStartStandaloneAction
and beforeFinishStandaloneAction
which could be ("pseudo")children actions of the target action, called before/after anything else in the action.
Is my assumption good, that currently it is not valid to start actions in onActionMiddleware hooks?
from mobx-keystone.
Related Issues (20)
- How to provide default/fixed value for inheriting class? HOT 4
- Mental model and idea behind keystone's tweaks/patches related to mobx observe
- Root Registry / Backrefs with deep observation HOT 5
- Keystone types supporting `onActionMiddleware` HOT 3
- How to listen "initial" onPatches on RootStore?
- incorrect detaches from root store when applying snapshot HOT 4
- model does not detached from root store if it in array HOT 4
- Exception when detaching model that have active reaction with reference HOT 4
- Not able to access static methods of parent class from child class when inheriting with generic types. HOT 1
- Does it support Typescript 5.X features? HOT 3
- Unnecessary loops causes low performance, how to optimize the performance HOT 2
- Binary data in models HOT 3
- getRootStore returns undefined. HOT 5
- yjs Map not recommended for key-value data. HOT 4
- Thank you HOT 2
- WeakMap key must be an Object HOT 5
- Getting 'extendObservable' only accepts plain objects as second argument HOT 1
- onInit does not execute from static creation method HOT 3
- No static checks to prevent assignment outside of an action HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobx-keystone.