modules/react/src/utils/extract-jsx-layers.js
function wrapInView(node) {
  if (!node) {
    return node;
  }
  if (typeof node === 'function') {
    // React.Children does not traverse functions.
    // All render callbacks must be protected under a <View>
    return createElement(View, {}, node);
  }
  if (Array.isArray(node)) {
    return node.map(wrapInView);
  }
  if (inheritsFrom(node.type, View)) {
    return node;
  }
  return node;
}
function wrapInView(node) {
  if (!node) {
    return node;
  }
  if (typeof node === 'function') {
    // React.Children does not traverse functions.
    // All render callbacks must be protected under a <View>
    return createElement(View, {}, node);
  }
  if (Array.isArray(node)) {
    return node.map(wrapInView);
  }
  if (inheritsFrom(node.type, View)) {
    return node;
  }
  return node;
}
function wrapInView ( node ) { if ( ! node ) { return node ; } if ( typeof node === 'function' ) { // React.Children does not traverse functions. // All render callbacks must be protected under a <View> return createElement ( View , { } , node ) ; } if ( Array . isArray ( node ) ) { return node . map ( wrapInView ) ; } if ( inheritsFrom ( node . type , View ) ) { return node ; } return node ; }
recursively wrap render callbacks in `View`
recursively wrap render callbacks in View