-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: default intro
to true
when using mount
#11280
Comments
Has there been widespread confusion about the existing behavior? Couldn't this have been done this way in Svelte 3, too (due to the hydrate constructor option)? Trying to estimate what the majority wants here and if this switch of defaults is warranted. |
I don't know about widespread confusion — it's fairly well signposted in the docs. We absolutely could have done it in Svelte 3, we just overlooked it, and a new major is the right time to rectify a bad decision. It feels like an absolute no-brainer to me — as a component author you've already made your intent explicit by adding the |
Note: we should keep the existing behaviour when using |
Describe the problem
Presently, we disable intro transitions when mounting components. The reason we do this is to avoid flashes when hydrating (we don't want to 'fade in' an element that's already visible), but that only really applies to
hydrate
.Describe the proposed solution
Default
intro
totrue
when callingmount
, andfalse
when callinghydrate
. Continue to respect the option if it is set explicitly (which only really applies tomount
; it would be very unusual to enable intros when hydrating).This would be a breaking change.
Importance
nice to have
The text was updated successfully, but these errors were encountered: