Skip to content

Assessing options for handling propagation of changes in deeply nested state tree #2112

Answered by dbstraight
dbstraight asked this question in General
Discussion options

You must be logged in to vote

I really appreciate all the information. This is very helpful.

I wish I could come up with a good simplified example of the kind of state updates I'm thinking about without having to try to explain my entire app. I'm definitely going to look at other ways to model the data, but I don't think there's any getting around these kind of distant updates.

Anyway, I posted originally just trying to show the middleware option as "vanilla" as possible but I think TS can do a lot of heavy lifting to make it much more ergonomic, so I want to share that too. Basically I've got this helper function:

import { IAnyType, Instance, IMiddlewareHandler } from "mobx-state-tree";

export type ChildMiddlewareHa…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@jamonholmgren
Comment options

@dbstraight
Comment options

Answer selected by coolsoftwaretyler
@coolsoftwaretyler
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants