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

Add unmountEventing through the NovaEventingProvider #85

Merged
merged 7 commits into from
Oct 10, 2023

Conversation

drewatk
Copy link
Contributor

@drewatk drewatk commented Oct 6, 2023

We've discovered a need to have two versions of eventing at once during component unmounts. Useeffect cleanup functions need to use the old version of eventing to get the old context to ensure proper routing of events. This change will allow hosts to maintain two eventing references, with the unmount eventing switching out later to keep the reference to the old execution context before unmount.

This change adds a useNovaUnmountEventing hook in the nova eventing provider. It is supplied by a new unmountEventing property. If the new property is not supplied, the new hook will use the existing eventing reference, to maintain backwards compatibility with nova hosts which do not need this functionality.

@drewatk drewatk changed the title Dratkins/use unmount eventing Add unmountEventing through the NovaEventingProvider Oct 6, 2023
@drewatk drewatk marked this pull request as ready for review October 6, 2023 18:27
@kerrynf kerrynf merged commit 6f2668e into microsoft:main Oct 10, 2023
2 checks passed
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