-
Notifications
You must be signed in to change notification settings - Fork 44
Svelte 5 Upgrade #131
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
base: main
Are you sure you want to change the base?
Svelte 5 Upgrade #131
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I'd be willing to help test a pre-release of this. |
Thanks @niemyjski! |
any news here ? |
Thanks for the awesome work! I would like to bring up that using the new async svelte branch (PR, discussion) produces this error:
in the |
I was able to fix the Elements.svelte beforeonMount(() => {
elements = stripe.elements({
mode,
currency,
amount,
appearance,
clientSecret,
fonts,
loader,
locale
});
register(stripe);
setContext('stripe', { stripe, elements });
}); Elements.svelte afteronMount(() => {
register(stripe);
});
$effect(() => {
if (stripe) {
elements = stripe?.elements({
mode,
currency,
amount,
appearance,
clientSecret,
fonts,
loader,
locale
});
}
});
setContext('stripe', {
get stripe() {
return stripe;
},
get elements() {
return elements;
}
}); |
svelte/legacy
createEventDispatcher
and replaceon:event
->onevent
<div>
's use CSSdisplay: contents
onMount
for initializing components$effect()
to sync prop changes with Stripe viaelement.update()
<Elements.Deferred>
component for creating payment intent later.