• Render the IElement to text. Use on the server.

    Parameters

    Returns string

    Example

    import { render } from 'deleight/dom'
    // create a template 1:
    const items = it => it.map(num => ({ li: num }));

    // create a template 2:
    const footer = year => `<footer>&copy; ${year}</footer>`;

    // use templates:
    const ul = render({
    main: [
    // object form:
    { ul: { 0: { class: 'list1' }, 1: items([1,2,3,4,5,6,7,8,9]) } },

    // text form:
    footer(1991)
    ]

    });

    // reuse a template:
    const ol = render({
    ol: { 0: { class: 'list2' }, 1: items([1,2,3,4,5,6,7,8,9,10]) }
    });