Typically, this is the code in the index.js document.
import ReactDOM from 'react-dom';
// ... codes
ReactDOM.render( app, document.getElementById( 'root' ) );
But this code also can be written in this way without using ReactDOM.
import {render} from 'react-dom';
// ... codes
render(<App />,document.getElementById('root'));
Top comments (0)