Skip to content

Add support for all iterable children, not just Arrays - #476

Open
neeharv wants to merge 19 commits into
preactjs:mainfrom
neeharv:master
Open

neeharv wants to merge 19 commits into
preactjs:mainfrom
neeharv:master

Conversation

@neeharv

@neeharv neeharv commented Dec 28, 2016

Copy link
Copy Markdown

This will fix preactjs/preact-compat#262

This is still WIP, as this fix obviously changes behaviour wrt the children being added to the stack in reverse order.

I wanted to have a discussion on the best way to push the children on to the stack, considering there is no reverse iterable protocol (yet). I could push them all to an array and then call .reverse() on it, but I'm unsure of the perf implications if there are a large number of children.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React.Children helpers should iterate over children inside an iterator

10 participants