Giter Site home page Giter Site logo

Comments (2)

xaviergonz avatar xaviergonz commented on June 8, 2024

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.

PEZO19 avatar PEZO19 commented on June 8, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.