Please sign in to comment.
Fix reordering of children
If a container has children A and B and their order is reversed, React will only trigger one reconciler method - appendChild. There's no call to removeChild, because appendChild's behavior in browsers removes the child that's being added from its last parent node. This behavior wasn't supported by Ink before. So, for example: Render 1: Container - Child A - Child B Reconciler calls: - appendChild(container, childA) - appendChild(container, childB) Render 2: Container - Child B - Child A Reconciler calls: - appendChild(container, childA) This last appendChild call will first remove childA from container and then append it to the end of the list again, making childB first.
- Loading branch information...