lib/jsx.js
function arrayToJSX(arr = []) {
  return (0, _map2.default)(arr, (el, key) => {
    if ((0, _isString2.default)(el)) {
      return el;
    }
    const { type, props, children } = el;

    return (0, _react.createElement)(type, _extends({}, props, { key }), ...arrayToJSX(children));
  });
}
function arrayToJSX(arr = []) {
  return (0, _map2.default)(arr, (el, key) => {
    if ((0, _isString2.default)(el)) {
      return el;
    }
    const { type, props, children } = el;

    return (0, _react.createElement)(type, _extends({}, props, { key }), ...arrayToJSX(children));
  });
}
function arrayToJSX ( arr = [ ] ) { return ( 0 , _map2 . default ) ( arr , ( el , key ) => { if ( ( 0 , _isString2 . default ) ( el ) ) { return el ; } const { type , props , children } = el ; return ( 0 , _react . createElement ) ( type , _extends ( { } , props , { key } ) , ... arrayToJSX ( children ) ) ; } ) ; }
Converts an array of plain objects describing React Elements to an array of React Elements.

@memberof module:jsx
@method arrayToJSX
@param {Array<string|Object>} [arr=[]] - an array of plain objects describing React Elements
@return {Array<ReactElement>} an array of React Elements
@example
import {arrayToJSX} from 'webcompiler';
// or - import {arrayToJSX} from 'webcompiler/lib/jsx';
// or - var arrayToJSX = require('webcompiler').arrayToJSX;
// or - var arrayToJSX = require('webcompiler/lib/jsx').arrayToJSX;

<div>{arrayToJSX([{type: 'h1', children: ['Hello world!']}])}</div>
Converts an array of plain objects describing React Elements to an array of React Elements .