File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed
packages/scratch-gui/src/playground Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ReactDOM from 'react-dom' ;
2
+ import ReactDomClient from 'react-dom/client ' ;
3
3
import { connect } from 'react-redux' ;
4
4
5
5
import Controls from '../containers/controls.jsx' ;
@@ -32,5 +32,5 @@ const App = AppStateHOC(HashParserHOC(BlocksOnly));
32
32
const appTarget = document . createElement ( 'div' ) ;
33
33
document . body . appendChild ( appTarget ) ;
34
34
35
- const root = ReactDOM . createRoot ( appTarget ) ;
35
+ const root = ReactDomClient . createRoot ( appTarget ) ;
36
36
root . render ( < App /> ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ReactDOM from 'react-dom' ;
2
+ import ReactDomClient from 'react-dom/client ' ;
3
3
4
4
import GUI from '../containers/gui.jsx' ;
5
5
import HashParserHOC from '../lib/hash-parser-hoc.jsx' ;
@@ -53,5 +53,5 @@ class Player extends React.Component {
53
53
const appTarget = document . createElement ( 'div' ) ;
54
54
document . body . appendChild ( appTarget ) ;
55
55
56
- const root = ReactDOM . createRoot ( appTarget ) ;
56
+ const root = ReactDomClient . createRoot ( appTarget ) ;
57
57
root . render ( < Player /> ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import 'core-js/fn/promise/finally';
5
5
import 'intl' ; // For Safari 9
6
6
7
7
import React from 'react' ;
8
- import ReactDOM from 'react-dom' ;
8
+ import ReactDomClient from 'react-dom/client ' ;
9
9
10
10
import AppStateHOC from '../lib/app-state-hoc.jsx' ;
11
11
import BrowserModalComponent from '../components/browser-modal/browser-modal.jsx' ;
@@ -26,7 +26,7 @@ if (supportedBrowser()) {
26
26
BrowserModalComponent . setAppElement ( appTarget ) ;
27
27
const WrappedBrowserModalComponent = AppStateHOC ( BrowserModalComponent , true /* localesOnly */ ) ;
28
28
const handleBack = ( ) => { } ;
29
- const root = ReactDOM . createRoot ( appTarget ) ;
29
+ const root = ReactDomClient . createRoot ( appTarget ) ;
30
30
// eslint-disable-next-line react/jsx-no-bind
31
31
root . render ( < WrappedBrowserModalComponent onBack = { handleBack } /> ) ;
32
32
}
Original file line number Diff line number Diff line change 1
1
import classNames from 'classnames' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import React from 'react' ;
4
- import ReactDOM from 'react-dom' ;
4
+ import ReactDomClient from 'react-dom/client ' ;
5
5
import { connect } from 'react-redux' ;
6
6
import { compose } from 'redux' ;
7
7
@@ -61,5 +61,5 @@ const WrappedPlayer = compose(
61
61
const appTarget = document . createElement ( 'div' ) ;
62
62
document . body . appendChild ( appTarget ) ;
63
63
64
- const root = ReactDOM . createRoot ( appTarget ) ;
64
+ const root = ReactDomClient . createRoot ( appTarget ) ;
65
65
root . render ( < WrappedPlayer isPlayerOnly /> ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ReactDOM from 'react-dom' ;
2
+ import ReactDomClient from 'react-dom/client ' ;
3
3
import { compose } from 'redux' ;
4
4
5
5
import AppStateHOC from '../lib/app-state-hoc.jsx' ;
@@ -62,7 +62,7 @@ export default appTarget => {
62
62
window . onbeforeunload = ( ) => true ;
63
63
}
64
64
65
- const root = ReactDOM . createRoot ( appTarget ) ;
65
+ const root = ReactDomClient . createRoot ( appTarget ) ;
66
66
67
67
root . render (
68
68
// important: this is checking whether `simulateScratchDesktop` is truthy, not just defined!
You can’t perform that action at this time.
0 commit comments