diff --git a/examples/gatsby/README.md b/examples/gatsby/README.md index 92665c268aef7c..78a159eafd6d1a 100644 --- a/examples/gatsby/README.md +++ b/examples/gatsby/README.md @@ -16,12 +16,12 @@ npm install npm run develop ``` -## Providing the theme +## The idea behind the example -To propagate the theme to a component tree use the `src/withRoot.js` HOC. -You should wrap **only** your top-level components with this HOC otherwise you risk re-rendering your React tree multiple times and styling issues during the build phase. +[Gatsby](https://github.com/gatsbyjs/gatsby) is a static site generator for React. +## `withRoot` usage -## The idea behind the example +We are using the `withRoot` higher-order component to accommodate the styling solution of Material-UI with Gatsby. -[Gatsby](https://github.com/gatsbyjs/gatsby) is a static site generator for React. +⚠️ You should be using a single `withRoot` for rendering one page.