Replies: 2 comments
-
Hey @doc987 - sorry it took so long for folks to get back to you here. I know it's been almost three years, so if you've since moved on from your MST question, I totally understand. I'm not 100% sure that this is the answer, but I think what you're probably looking for is something like MST's dependency injection with Would something like that solve this use case? Did you stumble upon that after writing this issue? Find another workaround? Let me know! Happy to chat about it some more if it's still interesting to you all these years later. If I don't hear back, I'll probably close this out in two weeks or so. |
Beta Was this translation helpful? Give feedback.
-
Oh y'know, I'm actually going to convert this over to a discussion, which will close out the issue, but create a new discussion thread where we can chat more, and/or you can mark my answer (or someone else's) as correct. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Suppose there is a
ReusableNode
that has acomputed
value which needs input that is external toself
. If the input was fixed, then a new property could be added to theReusableNode
model, and the fixed value passed in on creation. What if the input needs to be reactive? For example, in the code below, what if theRoot
node wanted to give a property (e.g.root.a
), or give a computed value (e.g.root.fn
), as the external input value thatroot.n.computed
would use? How is that done? Alternatively, maybe I'm thinking about this wrong, and there's a better approach.Beta Was this translation helpful? Give feedback.
All reactions