Skip to content

Commit cecfde5

Browse files
authored
Don't import star from ReactDOM (#21133)
1 parent 8e76371 commit cecfde5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/react-dom/src/client/ReactDOMOption.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
import * as React from 'react';
10+
import {Children} from 'react';
1111
import {getToStringValue, toString} from './ToStringValue';
1212

1313
let didWarnSelectedSetOnOption = false;
@@ -21,7 +21,7 @@ function flattenChildren(children) {
2121
// Note that this would throw on non-element objects.
2222
// Elements are stringified (which is normally irrelevant
2323
// but matters for <fbt>).
24-
React.Children.forEach(children, function(child) {
24+
Children.forEach(children, function(child) {
2525
if (child == null) {
2626
return;
2727
}
@@ -45,7 +45,7 @@ export function validateProps(element: Element, props: Object) {
4545
// TODO: this seems like it could cause a DEV-only throw for hydration
4646
// if children contains a non-element object. We should try to avoid that.
4747
if (typeof props.children === 'object' && props.children !== null) {
48-
React.Children.forEach(props.children, function(child) {
48+
Children.forEach(props.children, function(child) {
4949
if (child == null) {
5050
return;
5151
}

0 commit comments

Comments
 (0)