When is a capsule rebuilt? #214
-
I suppose the answer is yes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There are a few possibilities here that dictate what would happen. First, does Now, say This will all change if the capsule graph gets more complicated/ |
Beta Was this translation helpful? Give feedback.
There are a few possibilities here that dictate what would happen.
First, does
capsuleB
emit a new value (i.e.,newData != oldData
)? If the data returned after a rebuild happens is the same as it was before, thencapsuleA
remains untouched.Now, say
capsuleB
does emit new data. We must then ask whethercapsuleA
registers any side effects (i.e.,use.something()
)? If it does not register any side effects, then it will be disposed/removed from the container via idempotent garbage collection. If it does register a side effect, then it will in fact be rebuilt with the new value fromcapsuleB
…