function elementFromContent(content, addProps) {
    if (isNil(content)) return null;

    if (content.isElemFactory) {
        return content(addProps);
    }

    // Note: Would be more general to look for a *react* component.
    if (content.isHoistComponent) {
        return createElement(content, addProps);
    }

    const ret = isFunction(content) ? content() : content;
    if (ret === null) return null;
    throwIf(!isValidElement(ret),
        'Must specify either a React Element, HoistComponent or a function that returns a React Element.'
    );
    return addProps ? cloneElement(ret, addProps) : ret;
}
/**
 * Create a React element from either a HoistComponent or a function returning an element.
 *
 * Used by the TabContainer, DashContainer, DockView, and Navigator APIs to process the 'content'
 * configs provided to them for their tabs and views.
 *
 * @param {(ReactElement|Object|function)} content - Element, HoistComponent or function returning a React element.
 *      If a function, it may be an 'elemFactory' (as created by elemFactory()), or any function that
 *      returns a React element. In either case, the function will be called with no arguments.
 * @param {Object} [addProps] -- optional additional props to apply to the element.
 *      These will override any existing props placed on the element, and should be used with care.
 */
Create a React element from either a HoistComponent or a function returning an element.
Used by the TabContainer, DashContainer, DockView, and Navigator APIs to process the 'content'
configs provided to them for their tabs and views.

@param {(ReactElement|Object|function)} content - Element, HoistComponent or function returning a React element.
If a function, it may be an 'elemFactory' (as created by elemFactory()), or any function that
returns a React element. In either case, the function will be called with no arguments.
@param {Object} [addProps] -- optional additional props to apply to the element.
These will override any existing props placed on the element, and should be used with care.
Create a React element from either a HoistComponent or a function returning an element . Used by the TabContainer DashContainer DockView and Navigator APIs to process the ' content ' configs provided to them for their tabs and views . @param { ( ReactElement|Object|function ) } content - Element HoistComponent or function returning a React element . If a function it may be an ' elemFactory ' ( as created by elemFactory () ) or any function that returns a React element . In either case the function will be called with no arguments . @param { Object } [ addProps ] -- optional additional props to apply to the element . These will override any existing props placed on the element and should be used with care .
function elementFromContent(content, addProps) {
    if (isNil(content)) return null;
    if (content.isElemFactory) {
        return content(addProps);
    }
    if (content.isHoistComponent) {
        return createElement(content, addProps);
    }
    const ret = isFunction(content) ? content() : content;
    if (ret === null) return null;
    throwIf(!isValidElement(ret),
        'Must specify either a React Element, HoistComponent or a function that returns a React Element.'
    );
    return addProps ? cloneElement(ret, addProps) : ret;
}
function elementFromContent ( content , addProps ) { if ( isNil ( content ) ) return null ; if ( content . isElemFactory ) { return content ( addProps ) ; } if ( content . isHoistComponent ) { return createElement ( content , addProps ) ; } const ret = isFunction ( content ) ? content ( ) : content ; if ( ret === null ) return null ; throwIf ( ! isValidElement ( ret ) , 'Must specify either a React Element, HoistComponent or a function that returns a React Element.' ) ; return addProps ? cloneElement ( ret , addProps ) : ret ; }
Create a React element from either a HoistComponent or a function returning an element.
Create a React element from either a HoistComponent or a function returning an element .
// Note: Would be more general to look for a *react* component.