Closed asimonok closed 1 year ago
Patch coverage: 95.23
% and project coverage change: +2.92
:tada:
Comparison is base (
d0dc393
) 78.60% compared to head (3bbcdd7
) 81.52%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Example of using EventBus subscriptions with unsubscribe.
The problem: To prevent memory leaks, subscriptions must be canceled before create new ones or when component is unmounted.
The solution: Returned function will be called on component update/unmount
const subscription = eventBus.subscribe({type: 'data-hover'}, () => {
console.log('hello')
})
return () => {
subscription.unsubscribe();
}
Pass eventBus object to javascript function.
Resolves #175.