Hide SectionMessage after some time

Hi there,

is there a way to hide/close SectionMessage after some time?

Thank you

Try something like…

const [show, setShow] = useState(true)

useEffect(() => {
  const timer = setTimeout(() => setShow(false), 5000)
  return () => clearTimeout(timer)
}, [])

return show && <SectionMessage />

Yes, this is what i did not want to use, but if it is the only solution for now.

thank you