Skip to content

Commit 9c801e0

Browse files
LinusBorgThorsten Luenborg
and
Thorsten Luenborg
authored
fix: functional component SFC example (#596)
contained errors. Co-authored-by: Thorsten Luenborg <t.luneborg@googlemail.com>
1 parent 8102e22 commit 9c801e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/guide/migration/functional-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ export default DynamicHeading
8787

8888
### Single File Components (SFCs)
8989

90-
In 3.x, the performance difference between stateful and functional components has been drastically reduced and will be insignificant in most use cases. As a result, the migration path for developers using `functional` on SFCs is to remove the attribute. No additional work required.
90+
In 3.x, the performance difference between stateful and functional components has been drastically reduced and will be insignificant in most use cases. As a result, the migration path for developers using `functional` on SFCs is to remove the attribute and rename all references of `props` to `$props` and `attrs` to `$attrs`.
9191

9292
Using our `<dynamic-heading>` example from before, here is how it would look now.
9393

9494
```js{1}
9595
<template>
9696
<component
97-
v-bind:is="`h${props.level}`"
97+
v-bind:is="`h${$props.level}`"
9898
v-bind="$attrs"
9999
/>
100100
</template>

0 commit comments

Comments
 (0)