mirror of
https://github.com/expo/gl-react.git
synced 2026-11-15 17:34:34 -10:00
8 lines
223 B
JavaScript
8 lines
223 B
JavaScript
const React = require("../react-runtime");
|
|
|
|
module.exports = function pickReactFirstChild (children) {
|
|
return React.Children.count(children) === 1 ?
|
|
(children instanceof Array ? children[0] : children) :
|
|
null;
|
|
};
|