reactjs/react.dev
Auf GitHub ansehenMention that `Component.render` could return iterator
Open
#286 geöffnet am 14. Nov. 2017
difficulty: mediumgood first issuetype: documentation
Repository-Metriken
- Stars
- (11.763 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 37T 15h) (21 gemergte PRs in 30 T)
Beschreibung
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