Render app in dynamically added div container instead of static div.
parent
e7839f4cb1
commit
f957968d41
|
@ -8,6 +8,6 @@
|
|||
<meta name="description" content="">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<noscript>This website requires JavaScript, please enable it.</noscript>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,4 +4,8 @@ import { render } from 'react-dom';
|
|||
import './index.sass';
|
||||
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