Check out example codes for "react html symbol code". It will help you in understanding the concepts better.

Code Example 1

const strToDecode = 'Environment & Forest';
const parser = new DOMParser();
const decodedString = parser.parseFromString(`<!doctype html><body>${strToDecode}`, 'text/html').body.textContent;
console.log(decodedString);

Learn ReactJs, React Native from akashmittal.com