Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[examples] Fix remix example #34407

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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))
<!-- #default-branch-switch -->

- [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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,14 @@ ReactDOM.hydrate(<Main />, 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))
<!-- #default-branch-switch -->

- [本教程的参考实现](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)

Expand Down
11 changes: 7 additions & 4 deletions docs/data/material/guides/server-rendering/server-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,14 @@ ReactDOM.hydrate(<Main />, 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))
<!-- #default-branch-switch -->

- [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

Expand Down
2 changes: 1 addition & 1 deletion examples/remix-with-typescript/app/entry.client.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
8 changes: 4 additions & 4 deletions examples/remix-with-typescript/app/entry.server.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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,
Expand Down
10 changes: 9 additions & 1 deletion examples/remix-with-typescript/app/root.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion examples/remix-with-typescript/app/routes/about.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions examples/remix-with-typescript/app/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/remix-with-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"@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",
"remix": "latest"
"react-dom": "latest"
},
"devDependencies": {
"@remix-run/dev": "latest",
Expand Down