React – hide content with button

i’m new here. I got a problem with a task. I want a button that if you press it hides some content, a string in this case. If the content is hidden the button must change the text inside it,
and it must say “show” and instead of hiding it shows the content
previously hidden. If the content is already displayed, the button text will be “hide”.
I don’t understand how to use if statement