-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Svelte 5: suddendly from v121 I cannot use tanstack/query anymore #11429
Comments
Please provide a reproduction |
It's a default tanstack/query default app. I'll post a reproduction in a few hours... |
No repro here but I am also getting hydration_mismatch related to Svelte context with 121. Can't pinpoint it yet but 120 works as expected. |
https://github.com/alesvaupotic/svelte-5-next-121-context Basic repro here. Replacing next-120 with next-121 breaks it for me. |
Apologize for hijacking the thread, @frederikhors, I just thought we don't need another bug report as ours are related. |
My guess is that #11401 is the culprit though I haven't validated it yet. Update: Confirmed this is the culprit. Problem is that the snippet resets the current component context to that of the component it is rendered in, which fucks up the context chain: <!-- inside App.svelte -->
<Provider> <!-- context should be this ... -->
<Inner /> <!-- but because this is a snippet under the hood which resets the current component context, the context becomes App.svelte -->
</Provider> |
Ownership validation had a false positive when rendering a component as slotted content of another component. To fix this, #11401 did set the current component context to the context the snippet was declared in, not to the context it is rendered in. This was flawed because it means that component context was altered in a way that setContext/getContext failed because the parent chain was incorrect. This fixes that by introducing a separate global (dev time only) which tracks the component function the ownership needs. fixes #11429
#11438) Ownership validation had a false positive when rendering a component as slotted content of another component. To fix this, #11401 did set the current component context to the context the snippet was declared in, not to the context it is rendered in. This was flawed because it means that component context was altered in a way that setContext/getContext failed because the parent chain was incorrect. This fixes that by introducing a separate global (dev time only) which tracks the component function the ownership needs. fixes #11429
Describe the bug
Suddendly from v121 I cannot use tanstack/query anymore
Obviously nothing changed in my code from 120 to 121.
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: