You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use createRoot inside some reactive owner, the newly created owner is not added to the owned array of parent owner. Which prevents from walking down the owner tree from root to leafs, the created root is completely detached from that tree. And when both <For> and <Index> are using createRoot internally, the application tree could easily be sliced.
I'm aware that the owned array is for computations, rather than owners.
But is there another way to get to these "detached owners" walking downwards?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When you use
createRoot
inside some reactive owner, the newly created owner is not added to theowned
array of parent owner. Which prevents from walking down the owner tree from root to leafs, the created root is completely detached from that tree. And when both<For>
and<Index>
are using createRoot internally, the application tree could easily be sliced.I'm aware that the
owned
array is for computations, rather than owners.But is there another way to get to these "detached owners" walking downwards?
An example: https://codesandbox.io/s/detached-createroot-qljfj8
Beta Was this translation helpful? Give feedback.
All reactions