Challenge: Show/Hide Secret Message
Follow these instructions to complete your challenge:
- Create a functional component called
SecretMessage
.
- Use state to track whether the message is visible (
showMessage
).
- Display a paragraph: "This is a secret message!" only when
showMessage
is true
.
- Add a button to toggle the visibility of the message.
- The button should say "Hide" when the message is visible and "Show" when hidden.
Expected Output