Check out example codes for "javascript create node from innerhtml". It will help you in understanding the concepts better.

Code Example 1

function createElement( str ) {
    var frag = document.createDocumentFragment();

    var elem = document.createElement('div');
    elem.innerHTML = str;

    while (elem.childNodes[0]) {
        frag.appendChild(elem.childNodes[0]);
    }
    return frag;
}

Learn ReactJs, React Native from akashmittal.com