Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced useMemo with useCallback #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sweeta-sinha
Copy link

No description provided.

@huan086
Copy link

huan086 commented Oct 29, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants