The first thing the index does is to load the app file in a hashrouter object and send it to the element with id root.
This commit is contained in:
@@ -2,14 +2,19 @@
|
||||
* @Author: KevinMidboe
|
||||
* @Date: 2017-06-01 21:08:55
|
||||
* @Last Modified by: KevinMidboe
|
||||
* @Last Modified time: 2017-06-01 21:34:32
|
||||
* @Last Modified time: 2017-10-05 13:47:37
|
||||
|
||||
./client/index.js
|
||||
which is the webpack entry file
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { render } from 'react-dom';
|
||||
import { HashRouter } from 'react-router-dom';
|
||||
import App from './components/App.jsx';
|
||||
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
render((
|
||||
<HashRouter>
|
||||
<App />
|
||||
</HashRouter>
|
||||
), document.getElementById('root'));
|
||||
Reference in New Issue
Block a user