Closed aderahenry closed 4 years ago
Use alert.removeAll() to remove all alerts before calling new alert
I assume you are talking about an alert inside an useEffect
hook or something like that. Try to update to the latest release and doing something like:
const { error: errorAlert } = useAlert()
useEffect(()=> {
errorAlert("Oops, there's an error")
}, [errorAlert])
If that doesn't work, feel free to ask to reopen it.
How can duplicates be prevented? Using alert.remove(alert) does not do the job.