Props can be passed down when marked with export
.
<script>
export let name;
console.log({ name })
</script>
<PropsTaker prop={count} />
Then, in the receiving component:
<script>
export let prop
</script>
<div>Props passed: {prop}</div>
Props can be passed down when marked with export
.
<script>
export let name;
console.log({ name })
</script>
<PropsTaker prop={count} />
Then, in the receiving component:
<script>
export let prop
</script>
<div>Props passed: {prop}</div>