Switch "with" and "without destructuring"
The example for "without destructuring" was the destructured way it's done in the tutorial, the example for "with destructuring" was the old way to pass in a props object without destructuring
This commit is contained in:
parent
85e24bb45b
commit
34fe98f2f2
1 changed files with 5 additions and 5 deletions
|
@ -31,18 +31,18 @@ equivalent:
|
|||
<Tabs tabs="Without destructuring, With destructuring">
|
||||
<Tab>
|
||||
```design/src/bib.mjs
|
||||
function draftBib({ part }) {
|
||||
function draftBib(props) {
|
||||
|
||||
return props.part
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab>
|
||||
```design/src/bib.mjs
|
||||
function draftBib(props) {
|
||||
|
||||
return props.part
|
||||
function draftBib({ part }) {
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue