-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Feature Request: allow exporting rune from component as dynamic getters #16049
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
Comments
Is there a reason props can't be used here? |
let name = $state('world');
export { name }; |
as noted above, it is possible to get a getter using the default export ( it actually also exposes a setter ) It will still be DX improvement, to allow export directly in the variable declaration |
For now, it will be too confusing with legacy/svelte4 prop declaration. |
It will probably be allowed once legacy mode cease to exist #10523 |
Describe the problem
currently
compiles to
and exporting a rune or a variable is not allowed
Describe the proposed solution
This feature suggests exporting a binding to variables / runes using dynamic accessors
can be compiled to:
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: