From 4be6a715919459a3834ecc4b2445bd955cac61ef Mon Sep 17 00:00:00 2001 From: Garrone Joseph Date: Sun, 10 Jul 2022 18:44:37 +0000 Subject: [PATCH] GitBook: [#12] No subject --- publish-a-module-that-uses-tss.md | 15 ++++++--------- ssr/README.md | 6 ------ ssr/gatsby.md | 8 ++------ ssr/next.js.md | 6 ------ ssr/other-backends.md | 8 +------- 5 files changed, 9 insertions(+), 34 deletions(-) diff --git a/publish-a-module-that-uses-tss.md b/publish-a-module-that-uses-tss.md index 4bdfc4b..5499a0d 100644 --- a/publish-a-module-that-uses-tss.md +++ b/publish-a-module-that-uses-tss.md @@ -11,10 +11,10 @@ description: How to express you dependencies requirements ```json "name": "YOUR_MODULE", "dependencies": { - "tss-react": "^3.5.2" + "tss-react": "^4.0.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.2", + "react": "^16.8.0 || ^17.0.2 || 18.0.0" , "@mui/material": "^5.0.1", "@emotion/react": "^11.4.1", }, @@ -32,9 +32,7 @@ Your users install your module like that: yarn add YOUR_MODULE @mui/material @emotion/react @emotion/styled ``` -You do not need to provide special instructions related to SSR - -Your users also need to follow [TSS's instructions to enable SSR](ssr/) (at least for now...). +Regarding SSR setup you can forward your user to the dedicated [MUI documentation](https://mui.com/material-ui/guides/server-rendering/). {% endtab %} {% tab title="Your module don't use MUI" %} @@ -43,10 +41,10 @@ Your users also need to follow [TSS's instructions to enable SSR](ssr/) (at leas ```json "name": "YOUR_MODULE", "dependencies": { - "tss-react": "^3.5.2" + "tss-react": "^4.0.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.2", + "react": "^16.8.0 || ^17.0.2 || ^18.0.0", "@emotion/react": "^11.4.1", }, "devDependencies": { @@ -61,7 +59,6 @@ Your users install your module like that: yarn add YOUR_MODULE @emotion/react ``` -Your users also need to follow [TSS's instructions to enable SSR](ssr/). +Regarding SSR setup you can forward your user to [the dedicated documentation](ssr/). {% endtab %} {% endtabs %} - diff --git a/ssr/README.md b/ssr/README.md index 1f8873a..b83e45e 100644 --- a/ssr/README.md +++ b/ssr/README.md @@ -4,12 +4,6 @@ description: How to configure Server Side Sendering # ⚡ SSR -{% hint style="success" %} -**MUI**: Theses instructions are for the peoples using `tss-react` as a standalone solution. - -MUI users can refer to [the MUI documentation relative to SSR](https://mui.com/material-ui/guides/server-rendering/) and ignore this. -{% endhint %} - There are some minimal configuration required to make `tss-react` work with SSR. {% content-ref url="next.js.md" %} diff --git a/ssr/gatsby.md b/ssr/gatsby.md index d9d58de..4bf87d3 100644 --- a/ssr/gatsby.md +++ b/ssr/gatsby.md @@ -1,13 +1,9 @@ # Gatsby -{% hint style="success" %} -**MUI**: Theses instructions are for the peoples using `tss-react` as a standalone solution. - -MUI users can refer to [the MUI documentation relative to SSR](https://mui.com/material-ui/guides/server-rendering/) and ignore this. -{% endhint %} +Official Gatsby plugin is under development. In the meantime, you can you can set it up by hand following [this article](https://dev.to/deckstar/gatsby-js-how-to-solve-fouc-when-using-tss-react-and-material-ui-v5-465f) and [this example repo](https://github.com/Deckstar/gatsby-tss-example). -{% hint style="danger" %} +{% hint style="warning" %} If you are using nested selectors, you may need to provide [uniq identifiers to your stylesheet](../nested-selectors.md#ssr). {% endhint %} diff --git a/ssr/next.js.md b/ssr/next.js.md index c360810..527f0f0 100644 --- a/ssr/next.js.md +++ b/ssr/next.js.md @@ -1,11 +1,5 @@ # Next.js -{% hint style="success" %} -**MUI**: Theses instructions are for the peoples using `tss-react` as a standalone solution. - -MUI users can refer to [the MUI documentation relative to SSR](https://mui.com/material-ui/guides/server-rendering/) and ignore this. -{% endhint %} - {% hint style="info" %} Next.js + React 18 -> SSR will only work with Next.js 12.1.7-canary.4 or newer. {% endhint %} diff --git a/ssr/other-backends.md b/ssr/other-backends.md index 83810e2..4f496e0 100644 --- a/ssr/other-backends.md +++ b/ssr/other-backends.md @@ -4,12 +4,6 @@ description: Configure SSR in in frameworks other than Next.js like for example # Other backends -{% hint style="success" %} -**MUI**: Theses instructions are for the peoples using `tss-react` as a standalone solution. - -MUI users can refer to [the MUI documentation relative to SSR](https://mui.com/material-ui/guides/server-rendering/) and ignore this. -{% endhint %} - ``` yarn add @emotion/server ``` @@ -97,6 +91,6 @@ export function App(){ } ``` -{% hint style="danger" %} +{% hint style="warning" %} If you are using nested selectors, you may need to provide [uniq identifiers to your stylesheet](../nested-selectors.md#ssr). {% endhint %}