-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Conflict between const and $bindable #15754
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
I guess you could do something like this: <script lang="ts">
let { options: _options, selected = $bindable() }: { options: string[], selected: number } = $props();
const options = $derived(_options);
</script> |
For a lot of props you could do Sorry about formatting, on mobile. |
There's no solution to this, no, workarounds like shown in this thread exist though. Closing as unactionable; also related to #15675 |
Uh oh!
There was an error while loading. Please reload this page.
Originally posted by @dummdidumm in #12121
In this scenario, I’d like to define both const options and let selected simultaneously, but I can’t invoke $props twice. I suppose there’s currently no solution for this?
The text was updated successfully, but these errors were encountered: