I am new to reactJS.

I wonder if it is possible to hide/show components "onclick"? For example: index.php shows some text in headings and paragraphs(a component), a button or link can be found under the text. if the link or button is clicked, the text will change(new headings and paragraphes, aka a new component). How can this be done?