-
-
Notifications
You must be signed in to change notification settings - Fork 48
chore: add Svelte 5 docs for prefer-destructured-store-props
rule
#1034
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
Conversation
|
commit: |
Why this? You can still use stores with runes? |
Does the performance differ depending on whether the GOOD or BAD syntax is used when Svelte 5 is run in runes mode?
Also, since the $ syntax cannot be used in Svelte 5’s runes mode, wouldn’t it be difficult to rewrite to a GOOD form even if this rule reports something? |
See here, you can use the auto-subscription feature even with runes: As to the efficiency I can't say (I don't know enough of store internals), but if the rule doesn't make sense anymore, it should be disable on Svelte irrespective of whether runes are turned on, right? |
Further investigation confirmed that using code like the following for stores in Svelte 5 does provide better performance: let foo = $derived($store.foo) |
prefer-destructured-store-props
rule on Svelte 5 with runesprefer-destructured-store-props
rule
So I updated the docs instead of changing the config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
No description provided.