I have an alert box to confirm that the user has successfully subscribed:
<div className="alert alert-success"><strong>Success!</strong> Thank you for subscribing!</div>
When a user sends an email, I'm changing the "subscribed" state to true.
What I want is to:
- Show the alert box when the subscribed state is true
- Wait for 2 seconds
- Make it fade out
How can I do this?