You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While we try to restore context on best efforts, It is not always possible or convenient. There is an (intended to be internal) util callWithNuxt from #app can be used to use to restore context for async composables:
It is not convenient for DX because for performance reasons, we chose to accept second arg as arg array and that also it is not auto-imported. This utility is fundamentally bound to nuxtApp instance and can be exposed to public API:
We also have defineAsync to resolve issue but still there is no guarantee transform method works everyever.
We have callWithNuxt which could be exposed as an auto import but it is not user friendly nor makes sense to use another auto import when nuxtApp is main context
Additional information
Would you be willing to help implement this feature?
For reference, @posva proposed a similar concept for Vue core: vuejs/core#7451. I think we could align with the naming convention and maybe use it underneath later.
Describe the feature
Context: #14269 and #14723
While we try to restore context on best efforts, It is not always possible or convenient. There is an (intended to be internal) util
callWithNuxt
from#app
can be used to use to restore context for async composables:It is not convenient for DX because for performance reasons, we chose to accept second arg as arg array and that also it is not auto-imported. This utility is fundamentally bound to
nuxtApp
instance and can be exposed to public API:Alternatives:
defineAsync
to resolve issue but still there is no guarantee transform method works everyever.callWithNuxt
which could be exposed as an auto import but it is not user friendly nor makes sense to use another auto import when nuxtApp is main contextAdditional information
Final checks
The text was updated successfully, but these errors were encountered: