score:3

function MyComponent() {
  const [isTextVisible, setIsTextVisible] = useState(false);
  
  return (
     <>
       <button onClick={() => { setIsTextVisible(true) }}>Click on Me!</button>
       { isTextVisible && <p>I am visible only after button click!</p> }
     <>
  )
}

Related Query

More Query from same tag