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

[2.x] Fix <Deferred /> in Svelte adapter #2037

Merged
merged 3 commits into from
Oct 18, 2024
Merged

Conversation

pedroborges
Copy link
Collaborator

In issue #2012, the <Deferred /> component was rendering its default slot before the necessary props were updated, leading to errors when accessing properties on undefined objects. To address this, I updated the <Deferred /> component to subscribe to the $page store and use queueMicrotask skip a beat and switch loaded when the props are expected to be updated.

#2036 improves how $page is updated making it more predictable. The approach in this PR resolves the reactivity issue in the <Deferred /> component without modifying the $page store, maintaining compatibility for existing projects.

@reinink reinink merged commit 26f2db2 into master Oct 18, 2024
8 checks passed
@reinink reinink deleted the svelte-fix-deferred branch October 18, 2024 01:29
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