Commit 3738008 1 parent 0568e60 commit 3738008 Copy full SHA for 3738008
File tree 1 file changed +2
-5
lines changed
docs/src/modules/components
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,7 @@ const styles = (theme) => ({
21
21
function DemoFrame ( props ) {
22
22
const { children, classes, ...other } = props ;
23
23
const theme = useTheme ( ) ;
24
- const [ state , setState ] = React . useState ( {
25
- ready : false ,
26
- } ) ;
24
+ const [ state , setState ] = React . useState ( null ) ;
27
25
28
26
/**
29
27
* @type {import('react').Ref<Window | null> }
@@ -37,7 +35,6 @@ function DemoFrame(props) {
37
35
38
36
const onContentDidMount = ( ) => {
39
37
setState ( {
40
- ready : true ,
41
38
jss : create ( {
42
39
plugins : [ ...jssPreset ( ) . plugins , rtl ( ) ] ,
43
40
insertionPoint : jssInsertionPointRef . current ,
@@ -62,7 +59,7 @@ function DemoFrame(props) {
62
59
{ ...other }
63
60
>
64
61
< div ref = { jssInsertionPointRef } />
65
- { state . ready ? (
62
+ { state !== null ? (
66
63
< StylesProvider jss = { state . jss } sheetsManager = { state . sheetsManager } >
67
64
{ React . cloneElement ( children , {
68
65
window : state . window ,
You can’t perform that action at this time.
0 commit comments