Skip to content

Commit

Permalink
Update the part three of the tutorial (#2899)
Browse files Browse the repository at this point in the history
* Update the part three of the tutorial

Changed the export statement on "src/utils/typography.js" to be the ES6 way of exporting modules. Also added a note about using `children` as a function, since it may be confusing for people who have used React before with `children` not being a function.

* Update index.md
  • Loading branch information
SammyIsra authored and KyleAMathews committed Nov 13, 2017
1 parent cbe1621 commit f258264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/tutorial/part-three/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import fairyGateTheme from "typography-theme-fairy-gates"

const typography = new Typography(fairyGateTheme)

module.exports = typography
export default typography
```

Then our site's `gatsby-config.js`
Expand Down Expand Up @@ -115,6 +115,8 @@ export default ({ children }) =>
</div>
```

_Notice that unlike most `children` props, the `children` prop passed to layout components is a function and needs to be executed_

Stop `gatsby develop` and start it again for the new layout to take effect.

![with-layout2](with-layout2.png)
Expand Down

0 comments on commit f258264

Please sign in to comment.