We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Each event handler should return an unsubscribe function so that client can handle it correctly, especially in React. For example:
const unsubscribe = messaging.onMessage(function () { fetchInboxCount() }) // Unsubscribe when that screen is not rendered anymore: unsubscribe()
The text was updated successfully, but these errors were encountered:
Return unsubscribe function from each event handler #35
2d4bfe6
This is now implemented:
const listener = function() { // do something } const handler = messaging.onMessage(listener) handler.removeListener('newMessage', listener)
Sorry, something went wrong.
tahpot
No branches or pull requests
Each event handler should return an unsubscribe function so that client can handle it correctly, especially in React.
For example:
The text was updated successfully, but these errors were encountered: