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

SSR Context Lost #175

Closed
felixSchl opened this issue Jun 29, 2024 · 1 comment
Closed

SSR Context Lost #175

felixSchl opened this issue Jun 29, 2024 · 1 comment

Comments

@felixSchl
Copy link

Hey, I filed a bug earlier today with Nuxt that the $fetch global in useAsyncData loses the SSR event context. It is not a confirmed bug, so maybe it is actually intended behaviour. I am not sure. I saw in the nuxt sources they do this for their useFetch composable: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/fetch.ts#L172-L178.

Anyway, I think we should pass the fetch object returned from useRequestFetch into the http links. Thankfully this library already lets me override the fetch setting via the opts arg (doesn't type-check though) so I could confirm with this change it retains the SSR context. Should probably be part of the library and default though, hence the report.

@wobsoriano
Copy link
Owner

Hey, sorry for replying late but I'll do my by best to check this out on the weekend

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

No branches or pull requests

2 participants