diff --git a/docs/src/pages/components/no-ssr/FrameDeferring.js b/docs/src/pages/components/no-ssr/FrameDeferring.js
index fc1b85a60e698d..191e4e96490b94 100644
--- a/docs/src/pages/components/no-ssr/FrameDeferring.js
+++ b/docs/src/pages/components/no-ssr/FrameDeferring.js
@@ -4,16 +4,17 @@ import NoSsr from '@material-ui/core/NoSsr';
const useStyles = makeStyles({
container: {
- maxWidth: 300,
- wordBreak: 'break-all',
+ width: 300,
+ display: 'flex',
+ flexWrap: 'wrap',
},
});
function LargeTree() {
- return Array.from(new Array(3000)).map((_, index) => .);
+ return Array.from(new Array(5000)).map((_, index) => .);
}
-function FrameDeferring() {
+export default function FrameDeferring() {
const classes = useStyles();
const [state, setState] = React.useState({ open: false, defer: false });
@@ -30,6 +31,7 @@ function FrameDeferring() {
>
{'Render NoSsr defer="false"'}
+
- {state.open ? (
-
- Outside NoSsr
-
- ....Inside NoSsr
-
-
-
- ) : null}
+
+
+
+ {state.open ? (
+
+ Outside NoSsr
+
+ .....Inside NoSsr
+
+
+
+ ) : null}
+
);
}
-
-export default FrameDeferring;
diff --git a/docs/src/pages/components/no-ssr/FrameDeferring.tsx b/docs/src/pages/components/no-ssr/FrameDeferring.tsx
new file mode 100644
index 00000000000000..6be37c0ead0311
--- /dev/null
+++ b/docs/src/pages/components/no-ssr/FrameDeferring.tsx
@@ -0,0 +1,61 @@
+import React from 'react';
+import { makeStyles } from '@material-ui/core/styles';
+import NoSsr from '@material-ui/core/NoSsr';
+
+const useStyles = makeStyles({
+ container: {
+ width: 300,
+ display: 'flex',
+ flexWrap: 'wrap',
+ },
+});
+
+function LargeTree(): any {
+ return Array.from(new Array(5000)).map((_, index) => .);
+}
+
+export default function FrameDeferring() {
+ const classes = useStyles();
+ const [state, setState] = React.useState({ open: false, defer: false });
+
+ return (
+
+
+
+
+
+
+
+ {state.open ? (
+
+ Outside NoSsr
+
+ .....Inside NoSsr
+
+
+
+ ) : null}
+
+
+ );
+}
diff --git a/docs/src/pages/components/no-ssr/SimpleNoSsr.js b/docs/src/pages/components/no-ssr/SimpleNoSsr.js
index 3747b994775d5b..e75b9fe5f4b803 100644
--- a/docs/src/pages/components/no-ssr/SimpleNoSsr.js
+++ b/docs/src/pages/components/no-ssr/SimpleNoSsr.js
@@ -1,35 +1,18 @@
import React from 'react';
-import PropTypes from 'prop-types';
-import { withStyles } from '@material-ui/core/styles';
import NoSsr from '@material-ui/core/NoSsr';
-import Button from '@material-ui/core/Button';
-
-const styles = theme => ({
- button: {
- display: 'block',
- margin: theme.spacing(2),
- },
-});
-
-function SimpleNoSsr(props) {
- const { classes } = props;
+import Box from '@material-ui/core/Box';
+export default function SimpleNoSsr() {
return (
-
+
+ Server and Client
+
-
+
);
}
-
-SimpleNoSsr.propTypes = {
- classes: PropTypes.object.isRequired,
-};
-
-export default withStyles(styles)(SimpleNoSsr);
diff --git a/docs/src/pages/components/no-ssr/SimpleNoSsr.tsx b/docs/src/pages/components/no-ssr/SimpleNoSsr.tsx
new file mode 100644
index 00000000000000..e75b9fe5f4b803
--- /dev/null
+++ b/docs/src/pages/components/no-ssr/SimpleNoSsr.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+import NoSsr from '@material-ui/core/NoSsr';
+import Box from '@material-ui/core/Box';
+
+export default function SimpleNoSsr() {
+ return (
+
+
+ Server and Client
+
+
+
+ Client only
+
+
+
+ );
+}