Skip to content

Commit

Permalink
[docs] Document that @material-ui/styles is not strict mode compatible (
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Aug 12, 2021
1 parent 86894af commit 668c7be
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/src/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ const pages: readonly MuiPage[] = [
},
{
pathname: '/styles',
title: 'Styles (legacy)',
children: [
{ pathname: '/styles/basics' },
{ pathname: '/styles/advanced' },
Expand Down
9 changes: 7 additions & 2 deletions docs/src/pages/styles/basics/basics.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# @material-ui/styles

<p class="description">You can use Material-UI's styling solution in your app, whether or not you are using Material-UI components.</p>
<p class="description">The legacy styling solution of Material-UI.</p>

> **Note**: `@material-ui/styles` is the _**legacy**_ styling solution for Material-UI. It is deprecated in v5. It depends on [JSS](https://cssinjs.org/) as a styling solution, which is not used in the `@material-ui/core` anymore. If you don't want to have both emotion & JSS in your bundle, please refer to the [`@material-ui/system`](/system/basics/) documentation which is the recommended alternative.
> ⚠️ `@material-ui/styles` is the _**legacy**_ styling solution for Material-UI.
> It is deprecated in v5.
> It depends on [JSS](https://cssinjs.org/) as a styling solution, which is not used in the `@material-ui/core` anymore.
> If you don't want to have both emotion & JSS in your bundle, please refer to the [`@material-ui/system`](/system/basics/) documentation which is the recommended alternative.
> ⚠️ `@material-ui/styles` is not compatible with [React.StrictMode](https://reactjs.org/docs/strict-mode.html) or React 18.
Material-UI aims to provide a strong foundation for building dynamic UIs.
For the sake of simplicity, **we expose the styling solution used in Material-UI components** as the `@material-ui/styles` package.
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
"/guides/content-security-policy": "Content Security Policy",
"/guides/right-to-left": "Right-to-left",
"/guides/flow": "Flow",
"/styles": "Styles",
"/styles": "Styles (legacy)",
"/styles/basics": "Basics",
"/styles/advanced": "Advanced",
"https://material-ui.com/store/": "Premium themes",
Expand Down

0 comments on commit 668c7be

Please sign in to comment.