-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
52 lines (42 loc) · 1.36 KB
/
index.js
File metadata and controls
52 lines (42 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// import React from 'react';
// import ReactDOM from 'react-dom';
// import CelebrityJokes from './components/CelebrityJokes';
// import FoodJokes from './components/FoodJokes';
// import { Router, Route } from 'react-router';
// import { BrowserRouter } from 'react-router-dom'
// import history from './history'
// const Root = () => {
// return (
// <div className="container">
// <BrowserRouter>
// <Router history={history}>
// <Route path="/" component={FoodJokes} />
// <Route path="/special" component={CelebrityJokes} />
// </Router>
// </BrowserRouter>
// </div>
// )
// }
// ReactDOM.render(<Root />, document.getElementById('root'));
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { createStore, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import { createLogger } from 'redux-logger';
import thunk from 'redux-thunk';
const middleWare = [thunk];
if (process.env.NODE_ENV !== 'priduction') {
middleWare.push(createLogger());
}
const store = (
createStore,
applyMiddleware(...middleWare)
)
ReactDOM.render(
<App />,
document.getElementById('root')
);
//registerServiceWorker();