This pull request changes the value returned from useAlert from an object to a function, which is unnecessary and should be a caller side decision.
The correct way is to destructure the value returned from useAlert and put the show/error function in the dependency list of useEffect or useCallback rather than the returned value itself.
The previous pull request broke the alert.alerts list.
This pull request changes the value returned from useAlert from an object to a function, which is unnecessary and should be a caller side decision.
The correct way is to destructure the value returned from useAlert and put the
show
/error
function in the dependency list of useEffect or useCallback rather than the returned value itself.