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: store context in unctx and allow to not lose context on async calls with callWithContext #742

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

daniluk4000
Copy link

I've fixed main problem with useContext, but it works too well and I'm pretty sure I did this wrong (are SSR memory leaks possible here?).

Would like a deep review here. We'll try to already use this code in production by the way.

@daniluk4000
Copy link
Author

I've missed "wrapProperty" (and maybe some more) and will continue later.

@daniluk4000 daniluk4000 marked this pull request as draft February 16, 2023 17:08
@daniluk4000 daniluk4000 changed the title Fix: always store context in unctx and allow to not lose context on async calls Fix: store context in unctx and allow to not lose context on async calls with callWithContext Feb 20, 2023
@daniluk4000 daniluk4000 marked this pull request as ready for review February 20, 2023 09:32
@daniluk4000
Copy link
Author

@danielroe can you take a look at this please? Without these changes our project would not go to Composables migration.

I've published my own package in order to test this and my team to continue it's work and migration. This could be merged so those tens of thousands who use Nuxt CAPI will be able to not lose context.

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.

1 participant