Skip to content

Commit

Permalink
Material-UI and Ant Design requires a plugin (#19277)
Browse files Browse the repository at this point in the history
* Material-UI and Ant Design requires a plugin

- Ant Design needs a plugin to handle tree shaking and to import the styles.
- Material-UI needs a plugin to handler server-side style sheets, with JSS. In the future, we will rely on gatsby-plugin-styled-components.

*First reported in mui/material-ui#18197
*You might have noticed that I have switch the order between the two libs, of course, it's not biased, happy to follow the alphabetical ASC order if you prefer 🙃*

* Update what-you-dont-need-plugins-for.md

* Update what-you-dont-need-plugins-for.md
  • Loading branch information
oliviertassinari authored and LB committed Dec 10, 2019
1 parent 5cf6ed1 commit 823988d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/docs/what-you-dont-need-plugins-for.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Most third-party functionality you want to add to your website will follow stand
Some examples:

- Importing JavaScript packages that provide general functionality, such as `lodash` or `axios`
- Using React components or component libraries you want to include in your UI, such as `Ant Design`, `Material UI`, or the typeahead from your component library.
- Integrating visualization libraries, such as `Highcharts` or `d3`.

As a general rule, you may use _any_ npm package you might use without Gatsby, with Gatsby. What plugins offer is a prepackaged integration into the core Gatsby APIs to save you time and energy, with minimal configuration. In the case of `Styled Components`, you could manually render the `Provider` component near the root of your application, or you could just use `gatsby-plugin-styled-components` which takes care of this step for you in addition to any other difficulties you may run into configuring Styled Components to work with server side rendering.

0 comments on commit 823988d

Please sign in to comment.