How to inject React component on page?

Hi I want to render an icon next to a div on the webpage and when that icon is clicked I want to render a React component on the top right of the page. I've found docs on how to inject a React component on the page but I'm not sure how to render it based on clicking another component. Thanks!
Was this page helpful?