Closed as not planned
Description
This comes down to stylistic preference. I personally for example want to use
const
for components that only have readonly props. Or I prefer to useconst
for$derived
because for me it better communicates that this is a readonly value, not necessarily that the value itself never changes.We shouldn't be in the business of dictating these preferences, therefore closing.
Originally posted by @dummdidumm in #12121
<script lang="ts">
let { options, selected = $bindable() }: { options: string[], selected: number } = $props();
</script>
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?
Metadata
Metadata
Assignees
Labels
No labels