Check out example codes for "fetch html from url". It will help you in understanding the concepts better.

Code Example 1

fetch('/about').then(function (response) {
	// The API call was successful!
	return response.text();
}).then(function (html) {

	// Convert the HTML string into a document object
	var parser = new DOMParser();
	var doc = parser.parseFromString(html, 'text/html');

	// Get the image file
	var img = doc.querySelector('img');

}).catch(function (err) {
	// There was an error
	console.warn('Something went wrong.', err);

Learn ReactJs, React Native from