-
Notifications
You must be signed in to change notification settings - Fork 50.2k
Reimplement React.Children #9339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
koba04
wants to merge
21
commits into
facebook:master
from
koba04:remove-pooling-traverse-all-children
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
da48ae0
Remove to use PooledClass for traverseAllChildren
koba04 efb7107
move traverseAllChildren into ReactChildren
koba04 d5b4b57
Use mapChildren to forEach and toArray
koba04 437120d
Remove React.Children.mapIntoWithKeyPrefixInternal
koba04 a2bcddc
Run prettier
koba04 e6060f6
Remove unnecessary arguments
koba04 ed041b4
Remove an unused argument from ReactChildren.count
koba04 1ead882
Test for a single child and an array with one item
koba04 ab49e3a
Add component stack to invalid-object-child error (cherry-pick #9415)
koba04 2e982b9
Add test for single child witout key
koba04 892dd52
Improve component type check in getComponentKey (cherry-pick #9464)
koba04 1e5ab7c
Add Flow types
koba04 a6cdc05
Type for getReactElementKey
koba04 8a30669
Remove comments for types
koba04 8879aef
Run prettier
koba04 d57fab8
Do not allocate results with forEach
koba04 4ceb58f
Remove unnecessary traverseContext
koba04 87aefbf
Record fiber tests
koba04 d920c9b
Rebase #9903
koba04 96b675c
Fix flow errors with some $FlowFixMe
koba04 61981da
Fix $FlowFixMe
koba04 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Run prettier
- Loading branch information
commit 8879aef802f0dd00b2942de2e77b295e0cd96cb7
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to implement
forEachin terms ofmapbecause we don't want to allocate the result just to ignore it. It's fine to duplicate the code in this case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've fixed it!