-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Create implicit values for stores referenced with $ prefix anywhere in script #1889
Comments
I'm assuming using |
Yeah — as an example, I'm reworking the REPL to use stores, and want to be able to do this sort of thing: <!-- Repl.html -->
export function toJSON() {
return {
components: $components,
values: $values
};
} Then the page can get the state of everything (to save it to a gist etc) with Since |
allow reactive store references anywhere in script
Currently, referencing a reactive store
foo
as$foo
works in templates and in reactive declarations. There's no real reason that shouldn't be extended to apply anywhere in the instance<script>
block — especially since referencing$foo
in an event handler already works if you've referenced$foo
in one of the 'approved' ways.The text was updated successfully, but these errors were encountered: