* Returns the first child in a collection of children and verifies that there * is only one child in the collection. * * See https://reactjs.org/docs/react-api.html#react.children.only * * The current implementation of this function assumes that a single child gets * passed without a wrapper,
(children)
| 19280 | * structure. |
| 19281 | */ |
| 19282 | function onlyChild(children) { |
| 19283 | !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0; |
| 19284 | return children; |
| 19285 | } |
| 19286 | |
| 19287 | function createContext(defaultValue, calculateChangedBits) { |
| 19288 | if (calculateChangedBits === undefined) { |
nothing calls this directly
no test coverage detected