1
0
Fork 0

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:
mergerg 2023-03-21 22:21:00 -07:00 committed by GitHub
parent 85e24bb45b
commit 34fe98f2f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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>