Svelte · Junior · Question 32 of 76
How do you allow a parent to use bind:value on your component's prop?
<script>
let { value = $bindable("") } = $props();
</script>
<input bind:value />- ✓Correct answer: Mark the prop with
$bindable() - 2Export the prop with
export const - 3Any prop is bindable automatically
Explanation
Props flow down by default. $bindable explicitly allows two-way binding, which keeps data flow understandable.