Check out example codes for "jquery replace innerhtml". It will help you in understanding the concepts better.

Code Example 1

$("#myID").html("<div>New inner html</div>"); //replace element innerHTML in jQuery

Code Example 2

var itemtoReplaceContentOf = $('#regTitle');
itemtoReplaceContentOf.html('');
newcontent.appendTo(itemtoReplaceContentOf);

Code Example 3

$(element).html("Hello World");

Learn ReactJs, React Native from akashmittal.com