Render app in dynamically added div container instead of static div.
parent
e7839f4cb1
commit
f957968d41
|
@ -8,6 +8,6 @@
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<noscript>This website requires JavaScript, please enable it.</noscript>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,4 +4,8 @@ import { render } from 'react-dom';
|
||||||
import './index.sass';
|
import './index.sass';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
render(<App />, document.querySelector('#app'));
|
// Create div node to render app in
|
||||||
|
const rootContainer = document.createElement('div');
|
||||||
|
document.body.appendChild(rootContainer);
|
||||||
|
|
||||||
|
render(<App />, rootContainer);
|
||||||
|
|
Loading…
Reference in New Issue