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

Code Example 1

$("elementsSelector").replaceWith( "<h2>New content</h2>" );

Code Example 2

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

Code Example 3

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

Code Example 4

$('#selector').text('Your text here');

Learn ReactJs, React Native from akashmittal.com