Replies: 2 comments
-
Ok, I was using < Element is= { Root }> inside my Root component definition instead of using it when adding it as an instance in inside < Frame >. I just changed it to:
And now the component will re-render as expected when a new child is added. Now, when swapping a child component, can I use Children.map() or should i use the add(), move() and delete() APIs from this library? |
Beta Was this translation helpful? Give feedback.
0 replies
-
If it helps anyone, I ended up using the id of the Root node using useNode() and the accessing the children using editor.query.node(id).childNodes():
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Basically, if i add a component that is not a container to the root I want to wrap it inside a container.
How can I trigger a function when a new component has been added?
Beta Was this translation helpful? Give feedback.
All reactions