1
0
Fork 0

wip(markdown): Work on tutorial

This commit is contained in:
Joost De Cock 2022-10-10 04:50:43 +02:00
parent ed576747d8
commit 2d5cdf5806
6 changed files with 339 additions and 153 deletions

View file

@ -28,6 +28,16 @@ need to draft your method. Destructuring is a way to *pull things out of the
object into their own variable*. It saves us a bunch of typing as these two are
equivalent:
<Tabs tabs="Without destructuring, With destructuring">
<Tab>
```design/src/bib.mjs
function draftBib({ part }) {
return part
}
```
</Tab>
<Tab>
```design/src/bib.mjs
function draftBib(props) {
@ -35,13 +45,8 @@ function draftBib(props) {
}
```
```design/src/bib.mjs
function draftBib({ part }) {
return part
}
```
</Tab>
</Tabs>
As we'll make our way through this tutorial, we'll need more and more stuff, so
we'll be pulling it out of the object passed to the draft method via