reactjs/react.dev
View on GitHubMention that `Component.render` could return iterator
Open
#286 opened on Nov 14, 2017
difficulty: mediumgood first issuetype: documentation
Repository metrics
- Stars
- (11,763 stars)
- PR merge metrics
- (Avg merge 37d 15h) (21 merged PRs in 30d)
Description
According to the discussion here https://github.com/facebook/react/issues/11502 it is legal to return iterators from Component.render. But it is not mentioned in the document.
Moreover -- it would work only in production mode, not in development. It should me mentioned that to make it work in both environments -- you should use iterable, rather than iterator (see this Seq approach from the Reach issue).
I suggest to place it around https://reactjs.org/docs/react-component.html#fragments