reactstrap alert automatic hidden

user3468921 picture user3468921 · Nov 11, 2018 · Viewed 9.6k times · Source

I am new in React and I use Alert - Dismissing from Reactstrap , I need the alert to automatically disappear after 2s. I tried to find some function that could be done, but unfortunately I did not. Thank you for help

Answer

Shubham picture Shubham · Nov 11, 2018

Please have a look at this code, hiding alert after a specific time

when you want to show the alert on some action, you can enable a state associated with that alert and disable it when you want to hide it.