From 71512546de69078134223041314d7c8e1d31330d Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 28 Aug 2018 17:47:22 +0200 Subject: [PATCH] try a different wording --- examples/gatsby/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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.