-
I can't post the full source code because of copyright, however the situation is the following: // const propertyComponents = /* reactively computes an array of components supported by the store.selectedNode */
return (
<>
{hasSelectedNode() && (
<For each={propertyComponents()}>
{(component) => (
<Dynamic component={component} node={store.selectedNode!} />
)}
</For>
)}
</>
); The initial situtation is:
When the
The third bullet-point is my current issue because a property component is instantiated with a node that doesn't support that property. This wouldn't happen when the For is evaluated first, therefore "destroying" the dynamic component. I hope this description isn't too opaque. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
I see. I do up and down traversals to check if a parent could be disposed and resolve it first since the order of the queueing itself can't be guaranteed especially when there are multiple changes. It's possible that since a For loop interaction is its own root that it isn't looking up far enough. I think this would be a good scenario to isolate and work through. I thought I'd come up with a robust way to handle these situations, since subscriptions generally are made in initial execution order this usually only gets you on multiple change scenario. It's also possible this is the side effect of a more recent change. What version of Solid are you using? |
Beta Was this translation helpful? Give feedback.
I see. I do up and down traversals to check if a parent could be disposed and resolve it first since the order of the queueing itself can't be guaranteed especially when there are multiple changes. It's possible that since a For loop interaction is its own root that it isn't looking up far enough. I think this would be a good scenario to isolate and work through. I thought I'd come up with a robust way to handle these situations, since subscriptions generally are made in initial execution order this usually only gets you on multiple change scenario. It's also possible this is the side effect of a more recent change.
What version of Solid are you using?