-
Notifications
You must be signed in to change notification settings - Fork 374
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
[question]: Why is the notifications event listener (both click and foregroundWillDisplay) event firing more than once? #1548
Comments
Hello @akeva001 would you be able to send the logs from your device reproducing this behavior? We'll be happy to investigate. Thanks! |
I have the same issue. Listeners are not getting removed on reload when developing locally. |
I stumbled across this log because I have just realised that in my own development environment the click event defined below is literally firing 45 (and growing) times when the application starts.......and no notifications have been clicked at all! :(
Seems consistent with HMR in play. |
You can call
before adding event listener to clear all previous listeners |
Is there documentation regarding that method that states that it will remove existing listeners? The SDK just says |
You are right. It's about removing notifications. |
This problem still persists. Has anyone solved it? |
` useEffect(() => {
}, [dispatch]); // Add dispatch to dependency array if needed` I am facing the same problem eventListener is getting called multiple. times |
How can we help?
I am using the event listeners as described in the setup guide, but when I receive a notification, the events fire more than 10 times. How can I fix this?
Code of Conduct
The text was updated successfully, but these errors were encountered: