From 6c81e0aa438e1f3377fb37fd2b831d2d2cac3c52 Mon Sep 17 00:00:00 2001 From: secretshardul Date: Wed, 21 Sep 2022 11:49:38 +0530 Subject: [PATCH 1/3] bump: Update remix example imports, pin dependencies --- .../app/entry.client.tsx | 2 +- .../app/entry.server.tsx | 9 +++--- examples/remix-with-typescript/app/root.tsx | 10 ++++++- .../app/routes/about.tsx | 2 +- .../app/routes/index.tsx | 4 +-- examples/remix-with-typescript/package.json | 30 +++++++++---------- 6 files changed, 33 insertions(+), 24 deletions(-) diff --git a/examples/remix-with-typescript/app/entry.client.tsx b/examples/remix-with-typescript/app/entry.client.tsx index 08729b40d45dc7..546e401798a217 100644 --- a/examples/remix-with-typescript/app/entry.client.tsx +++ b/examples/remix-with-typescript/app/entry.client.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { useState } from 'react'; import { hydrate } from 'react-dom'; -import { RemixBrowser } from 'remix'; +import { RemixBrowser } from '@remix-run/react'; import { CacheProvider } from '@emotion/react'; import { ThemeProvider } from '@mui/material/styles'; import CssBaseline from '@mui/material/CssBaseline'; diff --git a/examples/remix-with-typescript/app/entry.server.tsx b/examples/remix-with-typescript/app/entry.server.tsx index e20c7310dfe977..b81e3ecc3e6f5c 100644 --- a/examples/remix-with-typescript/app/entry.server.tsx +++ b/examples/remix-with-typescript/app/entry.server.tsx @@ -1,14 +1,15 @@ import * as React from 'react'; import { renderToString } from 'react-dom/server'; -import { RemixServer } from 'remix'; -import type { EntryContext } from 'remix'; -import createEmotionCache from './src/createEmotionCache'; -import theme from './src/theme'; +import { RemixServer } from '@remix-run/react'; +import type { EntryContext } from '@remix-run/node'; import CssBaseline from '@mui/material/CssBaseline'; import { ThemeProvider } from '@mui/material/styles'; import { CacheProvider } from '@emotion/react'; import createEmotionServer from '@emotion/server/create-instance'; +import createEmotionCache from './src/createEmotionCache'; +import theme from './src/theme'; + export default function handleRequest( request: Request, responseStatusCode: number, diff --git a/examples/remix-with-typescript/app/root.tsx b/examples/remix-with-typescript/app/root.tsx index dcd0315fca6a26..8b7d3991574702 100644 --- a/examples/remix-with-typescript/app/root.tsx +++ b/examples/remix-with-typescript/app/root.tsx @@ -1,5 +1,13 @@ import * as React from 'react'; -import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration, useCatch } from 'remix'; +import { + Links, + LiveReload, + Meta, + Outlet, + Scripts, + ScrollRestoration, + useCatch, +} from '@remix-run/react'; import { withEmotionCache } from '@emotion/react'; import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material'; import theme from './src/theme'; diff --git a/examples/remix-with-typescript/app/routes/about.tsx b/examples/remix-with-typescript/app/routes/about.tsx index ab83091db63d75..c78e3bea00bd7b 100644 --- a/examples/remix-with-typescript/app/routes/about.tsx +++ b/examples/remix-with-typescript/app/routes/about.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Link } from 'remix'; +import { Link } from '@remix-run/react'; import Typography from '@mui/material/Typography'; import Button from '@mui/material/Button'; diff --git a/examples/remix-with-typescript/app/routes/index.tsx b/examples/remix-with-typescript/app/routes/index.tsx index f264c5b93a18e1..93b2d104034c50 100644 --- a/examples/remix-with-typescript/app/routes/index.tsx +++ b/examples/remix-with-typescript/app/routes/index.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import type { MetaFunction } from 'remix'; -import { Link } from 'remix'; +import type { MetaFunction } from '@remix-run/node'; +import { Link } from '@remix-run/react'; import Typography from '@mui/material/Typography'; // https://remix.run/api/conventions#meta diff --git a/examples/remix-with-typescript/package.json b/examples/remix-with-typescript/package.json index bc30452108b749..067298e4e57e32 100644 --- a/examples/remix-with-typescript/package.json +++ b/examples/remix-with-typescript/package.json @@ -1,6 +1,6 @@ { "name": "remix-with-typescript", - "version": "5.0.0", + "version": "6.0.0", "private": true, "scripts": { "build": "remix build", @@ -9,22 +9,22 @@ "start": "remix-serve build" }, "dependencies": { - "@emotion/cache": "latest", - "@emotion/react": "latest", - "@emotion/server": "latest", - "@emotion/styled": "latest", - "@mui/material": "latest", - "@remix-run/react": "latest", - "@remix-run/serve": "latest", - "react": "latest", - "react-dom": "latest", - "remix": "latest" + "@emotion/cache": "^11.10.3", + "@emotion/react": "^11.10.4", + "@emotion/server": "^11.10.0", + "@emotion/styled": "^11.10.4", + "@mui/material": "5.10.6", + "@remix-run/node": "^1.7.1", + "@remix-run/react": "^1.7.1", + "@remix-run/serve": "^1.7.1", + "react": "^17.0.2", + "react-dom": "^17.0.2" }, "devDependencies": { - "@remix-run/dev": "latest", - "@types/react": "latest", - "@types/react-dom": "latest", - "typescript": "latest" + "@remix-run/dev": "^1.7.1", + "@types/react": "^17.0.47", + "@types/react-dom": "^17.0.17", + "typescript": "^4.7.4" }, "engines": { "node": ">=14" From 76527e03cadb8ff003c2b93251f56db7e740ba93 Mon Sep 17 00:00:00 2001 From: secretshardul Date: Wed, 21 Sep 2022 12:40:34 +0530 Subject: [PATCH 2/3] doc: Add link to remix SSR example --- docs/data/material/guides/server-rendering/server-rendering.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/data/material/guides/server-rendering/server-rendering.md b/docs/data/material/guides/server-rendering/server-rendering.md index 66721fc5cb8410..60b14ad03b1054 100644 --- a/docs/data/material/guides/server-rendering/server-rendering.md +++ b/docs/data/material/guides/server-rendering/server-rendering.md @@ -218,6 +218,7 @@ We host different reference implementations which you can find in the [GitHub re - [The reference implementation of this tutorial](https://github.com/mui/material-ui/tree/HEAD/examples/ssr) - [Gatsby](https://github.com/mui/material-ui/tree/HEAD/examples/gatsby) - [Next.js](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs) ([TypeScript version](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs-with-typescript)) +- [Remix.run](https://github.com/mui/material-ui/tree/HEAD/examples/remix-with-typescript) ## Troubleshooting From 5d740d1f0bf20c7c3c6dcccb40ed510dac4e66fc Mon Sep 17 00:00:00 2001 From: secretshardul Date: Wed, 21 Sep 2022 15:01:09 +0530 Subject: [PATCH 3/3] fix: Unpin remix example dependencies, update docs and lint - Use 'latest' dependencies in Remix example - Add remix example in Portuguese and Chinese docs - Examples point to master instead of HEAD - Remove spacing as per convention --- .../server-rendering/server-rendering-pt.md | 11 ++++--- .../server-rendering/server-rendering-zh.md | 11 ++++--- .../server-rendering/server-rendering.md | 12 ++++---- .../app/entry.server.tsx | 1 - examples/remix-with-typescript/package.json | 30 +++++++++---------- 5 files changed, 36 insertions(+), 29 deletions(-) diff --git a/docs/data/material/guides/server-rendering/server-rendering-pt.md b/docs/data/material/guides/server-rendering/server-rendering-pt.md index bded74fa886cf9..0fc145a7d903b9 100644 --- a/docs/data/material/guides/server-rendering/server-rendering-pt.md +++ b/docs/data/material/guides/server-rendering/server-rendering-pt.md @@ -204,11 +204,14 @@ function Main() { ## Implementações de referência -We host different reference implementations which you can find in the [GitHub repository](https://github.com/mui/material-ui) under the [`/examples`](https://github.com/mui/material-ui/tree/HEAD/examples) folder: +We host different reference implementations which you can find in the [GitHub repository](https://github.com/mui/material-ui) under the [`/examples`](https://github.com/mui/material-ui/tree/master/examples) folder: -- [A implementação de referência deste tutorial](https://github.com/mui/material-ui/tree/HEAD/examples/ssr) -- [Gatsby](https://github.com/mui/material-ui/tree/HEAD/examples/gatsby) -- [Next.js](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs) ([TypeScript version](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs-with-typescript)) + + +- [A implementação de referência deste tutorial](https://github.com/mui/material-ui/tree/master/examples/ssr) +- [Gatsby](https://github.com/mui/material-ui/tree/master/examples/gatsby) +- [Next.js](https://github.com/mui/material-ui/tree/master/examples/nextjs) ([TypeScript version](https://github.com/mui/material-ui/tree/master/examples/nextjs-with-typescript)) +- [Remix.run](https://github.com/mui/material-ui/tree/master/examples/remix-with-typescript) ## Resolução de problemas diff --git a/docs/data/material/guides/server-rendering/server-rendering-zh.md b/docs/data/material/guides/server-rendering/server-rendering-zh.md index 4b1447d5618c4d..1253a1ba09960a 100644 --- a/docs/data/material/guides/server-rendering/server-rendering-zh.md +++ b/docs/data/material/guides/server-rendering/server-rendering-zh.md @@ -280,11 +280,14 @@ ReactDOM.hydrate(
, document.querySelector('#root')); ## 参考实现 -We host different reference implementations which you can find in the [GitHub repository](https://github.com/mui/material-ui) under the [`/examples`](https://github.com/mui/material-ui/tree/HEAD/examples) folder: +We host different reference implementations which you can find in the [GitHub repository](https://github.com/mui/material-ui) under the [`/examples`](https://github.com/mui/material-ui/tree/master/examples) folder: -- [本教程的参考实现](https://github.com/mui/material-ui/tree/HEAD/examples/ssr) -- [Gatsby](https://github.com/mui/material-ui/tree/HEAD/examples/gatsby) -- [Next.js](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs) ([TypeScript version](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs-with-typescript)) + + +- [本教程的参考实现](https://github.com/mui/material-ui/tree/master/examples/ssr) +- [Gatsby](https://github.com/mui/material-ui/tree/master/examples/gatsby) +- [Next.js](https://github.com/mui/material-ui/tree/master/examples/nextjs) ([TypeScript version](https://github.com/mui/material-ui/tree/master/examples/nextjs-with-typescript)) +- [Remix.run](https://github.com/mui/material-ui/tree/master/examples/remix-with-typescript) ## 故障排除(Troubleshooting) diff --git a/docs/data/material/guides/server-rendering/server-rendering.md b/docs/data/material/guides/server-rendering/server-rendering.md index 60b14ad03b1054..10e8ac60bb0cc9 100644 --- a/docs/data/material/guides/server-rendering/server-rendering.md +++ b/docs/data/material/guides/server-rendering/server-rendering.md @@ -213,12 +213,14 @@ ReactDOM.hydrate(
, document.querySelector('#root')); ## Reference implementations -We host different reference implementations which you can find in the [GitHub repository](https://github.com/mui/material-ui) under the [`/examples`](https://github.com/mui/material-ui/tree/HEAD/examples) folder: +We host different reference implementations which you can find in the [GitHub repository](https://github.com/mui/material-ui) under the [`/examples`](https://github.com/mui/material-ui/tree/master/examples) folder: -- [The reference implementation of this tutorial](https://github.com/mui/material-ui/tree/HEAD/examples/ssr) -- [Gatsby](https://github.com/mui/material-ui/tree/HEAD/examples/gatsby) -- [Next.js](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs) ([TypeScript version](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs-with-typescript)) -- [Remix.run](https://github.com/mui/material-ui/tree/HEAD/examples/remix-with-typescript) + + +- [The reference implementation of this tutorial](https://github.com/mui/material-ui/tree/master/examples/ssr) +- [Gatsby](https://github.com/mui/material-ui/tree/master/examples/gatsby) +- [Next.js](https://github.com/mui/material-ui/tree/master/examples/nextjs) ([TypeScript version](https://github.com/mui/material-ui/tree/master/examples/nextjs-with-typescript)) +- [Remix.run](https://github.com/mui/material-ui/tree/master/examples/remix-with-typescript) ## Troubleshooting diff --git a/examples/remix-with-typescript/app/entry.server.tsx b/examples/remix-with-typescript/app/entry.server.tsx index b81e3ecc3e6f5c..fe77fd44c8595c 100644 --- a/examples/remix-with-typescript/app/entry.server.tsx +++ b/examples/remix-with-typescript/app/entry.server.tsx @@ -6,7 +6,6 @@ import CssBaseline from '@mui/material/CssBaseline'; import { ThemeProvider } from '@mui/material/styles'; import { CacheProvider } from '@emotion/react'; import createEmotionServer from '@emotion/server/create-instance'; - import createEmotionCache from './src/createEmotionCache'; import theme from './src/theme'; diff --git a/examples/remix-with-typescript/package.json b/examples/remix-with-typescript/package.json index 067298e4e57e32..bef87ad52f3cf0 100644 --- a/examples/remix-with-typescript/package.json +++ b/examples/remix-with-typescript/package.json @@ -1,6 +1,6 @@ { "name": "remix-with-typescript", - "version": "6.0.0", + "version": "5.0.0", "private": true, "scripts": { "build": "remix build", @@ -9,22 +9,22 @@ "start": "remix-serve build" }, "dependencies": { - "@emotion/cache": "^11.10.3", - "@emotion/react": "^11.10.4", - "@emotion/server": "^11.10.0", - "@emotion/styled": "^11.10.4", - "@mui/material": "5.10.6", - "@remix-run/node": "^1.7.1", - "@remix-run/react": "^1.7.1", - "@remix-run/serve": "^1.7.1", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "@emotion/cache": "latest", + "@emotion/react": "latest", + "@emotion/server": "latest", + "@emotion/styled": "latest", + "@mui/material": "latest", + "@remix-run/node": "latest", + "@remix-run/react": "latest", + "@remix-run/serve": "latest", + "react": "latest", + "react-dom": "latest" }, "devDependencies": { - "@remix-run/dev": "^1.7.1", - "@types/react": "^17.0.47", - "@types/react-dom": "^17.0.17", - "typescript": "^4.7.4" + "@remix-run/dev": "latest", + "@types/react": "latest", + "@types/react-dom": "latest", + "typescript": "latest" }, "engines": { "node": ">=14"