Deviopath › React

Show / Hide

Easy · State

Render a button that toggles a secret message.

At first the button says "Show" and no message is visible. After a click the button says "Hide" and <p>Secret message</p> appears. Clicking again hides it.

Next: Dark Mode Toggle