Moved from ryansolid/dom-expressions#294.
insert only walks arrays. A custom iterable of nodes (anything with Symbol.iterator that is not an array) is skipped with Unrecognized value. Skipped inserting. That shows up from non-JS producers (e.g. Squint) that hand JSX a collection rather than Array.from(...).
This is still real. It was never taken because walking general iterables on the insert hot path has a cost, and For / other list helpers would need the same treatment to be consistent.
Leaving it here as an enhancement for 2.x rather than a 1.x fix.
Moved from ryansolid/dom-expressions#294.
insertonly walks arrays. A custom iterable of nodes (anything withSymbol.iteratorthat is not an array) is skipped withUnrecognized value. Skipped inserting. That shows up from non-JS producers (e.g. Squint) that hand JSX a collection rather thanArray.from(...).This is still real. It was never taken because walking general iterables on the insert hot path has a cost, and
For/ other list helpers would need the same treatment to be consistent.Leaving it here as an enhancement for 2.x rather than a 1.x fix.