Here's the problem:
The whole updateChildren index cycle thing is relative to the parent, but counts the nodes of the children. So it's able to properly place fragments, no problem. This is good.
What it doesn't know is how to properly place items contained by the fragment, which need to have their nodeIndices offset by their real parent.
The initial render of the fragments works fine because it's just inserting the entire markup of the fragment at a certain index, and incrementing the offset by the amount contained in the fragment. Further inserts break because it's not using this index.
The nodeIndices can be stored relative to the fragment, but we need to be able to add the nodeIndex of the parent.
And, of course, getting the nodeIndex of the parent isn't just a this away inside createChild - the parent doesn't contain the nodeIndex; its owner does. I don't think I can just safely access this._currentElement._owner._nodeIndex. Blargh.
Here's the problem:
The whole updateChildren index cycle thing is relative to the parent, but counts the nodes of the children. So it's able to properly place fragments, no problem. This is good.
What it doesn't know is how to properly place items contained by the fragment, which need to have their nodeIndices offset by their real parent.
The initial render of the fragments works fine because it's just inserting the entire markup of the fragment at a certain index, and incrementing the offset by the amount contained in the fragment. Further inserts break because it's not using this index.
The nodeIndices can be stored relative to the fragment, but we need to be able to add the nodeIndex of the parent.
And, of course, getting the nodeIndex of the parent isn't just a
thisaway insidecreateChild- the parent doesn't contain the nodeIndex; its owner does. I don't think I can just safely accessthis._currentElement._owner._nodeIndex. Blargh.