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

Svelte5 support #67

Open
stalkerg opened this issue May 20, 2024 · 7 comments
Open

Svelte5 support #67

stalkerg opened this issue May 20, 2024 · 7 comments

Comments

@stalkerg
Copy link

Seems like we should replace storage by value.

@cibernox
Copy link
Owner

I need to take a look at the needed changes to support svelte 5

@stalkerg
Copy link
Author

yeah, the main change it's storage replaced by rune. Shouldn't be too much changes.

@stalkerg
Copy link
Author

Will be good to do this #66 during this support as well.

@stalkerg
Copy link
Author

stalkerg commented Oct 23, 2024

Svelte5 is released. Any updates? Should I help, or should we start searching for a new library?

@cibernox
Copy link
Owner

Now that svelte5 is out I'll find some time to work on it. I haven't used svelte 5 new idioms a lot yet, so I need to get familiar with them first.

If anyone has used them for a while any input is welcomed.

@stalkerg
Copy link
Author

stalkerg commented Oct 24, 2024

As I said, Svelte5 provided a universal reactive solution - $state(), which replaces Svelte4 Stores and component-level variables. I think we just should replace Store by $state, that's it.
Basically, import { t } from 'svelte-intl-precompile'; t here should state.
As I understand, everything else can be kept as is. Of course, internally, you will work with the new $state a little bit differently, but it looks like nothing complicated.

But we definitely should also solve #66

@cibernox
Copy link
Owner

cibernox commented Nov 1, 2024

ok, I started working on this a bit. To make this better the changes are a bit more profound than that. Ideally.

A lot of the code is now unnecesarily complicated because in JS/TS files we had no reactivity, but now with $state being usable outside svelte components the codebase can be greatly simplified.

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

No branches or pull requests

2 participants