I can see from the docs here that I should be able to get a second function out of the useAlert hook like so:
const {show, hide} = useAlert(...)
However when I try and use this I get an error saying the function does not exist:
TypeError: hide is not a function
Perhaps I am getting the hide function in the wrong way?
The reason I want to trigger the hide manually is because the app is showing a critical error (which does not auto hide and I can’t seem to get it to auto hide). So I need to set the error to hide when the user dismisses conflicts in another part of the app.
Any help much appreciated!
Thanks,
Pete