-
-
Notifications
You must be signed in to change notification settings - Fork 392
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: Minimalest upgrade #1872
Open
jamesst20
wants to merge
1
commit into
inertiajs:master
Choose a base branch
from
jamesst20:svelte5-minimal
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+645
−85
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced May 12, 2024
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 12, 2024
…-main [inertiajs#1872] Svelte 5: Minimalest upgrade
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 12, 2024
…-main [inertiajs#1872] Svelte 5: Minimalest upgrade
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 12, 2024
…-main [inertiajs#1872] Svelte 5: Minimalest upgrade
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 12, 2024
…-main [inertiajs#1872] Svelte 5: Minimalest upgrade
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 13, 2024
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 13, 2024
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 13, 2024
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 16, 2024
…-main [inertiajs#1872] Svelte 5: Minimalest upgrade
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 28, 2024
…-main [inertiajs#1872] Svelte 5: Minimalest upgrade
jamesst20
added a commit
to jamesst20/inertia
that referenced
this pull request
May 28, 2024
…-main [inertiajs#1872] Svelte 5: Minimalest upgrade
Extract rendering outside createInertiaApp to allow Svelte 4 & 5 compatibility
jamesst20
force-pushed
the
svelte5-minimal
branch
from
May 28, 2024 02:22
466afe7
to
0d54284
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking change
Svelte 5 changed how SSR rendering works. Under Svelte 3&4, you can call MyComponent.render.
Under Svelte 5 you must import the render method from a package that doesn't exist under Svelte 3 & 4 making impossible to have compatibility for both unless we extract the component rendering outside.
We must now pass an extra parameter function that will handle the rendering outside Inertia giving the user the opportunity to use any Svelte version.
I have added a warning
Warning to Svelte 5 users
$
syntax when importing reactive state from Inertia such as $page$form.something.push({...})
will not trigger state refresh. This is likely a really huge bummer so you may consider using my fork adapter instead @jamesst20/inertia-svelte5. Hopefully Inertia maintainers change their about having a separate Svelte 5 adapter.$form.something = $form.something
to trigger state refresh on updated object without creating a full copy before updating even if you use Svelte 5