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

fix for onClose fires twice dev mode #916

Closed

Conversation

D-Andreev
Copy link

#741 (comment)

I'm playing around with this, after writing the comment. With the following changes onClose is called only once on my dev env.

Basically I removed the cleanup function in useEffect that was calling onClose and I started calling it from removeToast in useToastContainer hook.
Off course this is a draft PR and I don't expect it to be merged like this, some feedback on this would be great before working on the further. I'm wondering if any other general changes would be required.

@slashwhatever
Copy link

+1 for this as it's causing us issues in dev

@fkhadra
Copy link
Owner

fkhadra commented Jun 18, 2023

Closing the PR as it's being fixed by #968

@fkhadra fkhadra closed this Jun 18, 2023
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.

3 participants