-
Notifications
You must be signed in to change notification settings - Fork 527
Description
@inertiajs/svelte Version
2.1.2
Backend stack (optional)
No response
Describe the problem
When I'm using the Svelte 5 syntax in Inertia v2, I get uncomfortable DX like this: $page.blablabla
and $form.blablabla
. This is different when compare it with Inertia v2 (Vue/ReactJS). The reason is in Inertia v2, the Svelte 4 also supported. I'm not sure how many (literally) large scaled project using Inertia v2 with Svelte 4 syntax but with Svelte 5 it much more simpler thanks to the Svelte's runes. E.g. If we re-write the implemetation of usePage
, useForm
using global state runes, the DX will be improved. So, I just call like this: page.blablabla
and form.blablabla
.
If we want to keep support for Svelte 4, then we must split the packages: The packages/svelte4
for Svelte 4 and the packages/svelte
for Svelte 5. So, we can re-write components, utilities in the package with new Svelte 5 syntax without disturb the Svelte 4 itself.
Steps to reproduce
Nothing.