Skip to content

Commit bcae341

Browse files
committed
Enable Redux dev tools to help debugging
1 parent 337e0f2 commit bcae341

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/App.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import React from 'react'
22
import { Provider } from 'react-redux'
33
import { BrowserRouter as Router } from 'react-router-dom'
4-
import { applyMiddleware, createStore } from 'redux'
4+
import { applyMiddleware, compose, createStore } from 'redux'
55
import ReduxThunk from 'redux-thunk'
66
import './App.css'
77
import Footer from './Components/Footer'
88
import Navbar from './Components/Navbar'
99
import reducers from './Redux/Reducer'
1010
import Routes from './Routes'
1111

12-
const store = createStore(reducers, applyMiddleware(ReduxThunk))
12+
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
13+
const store = createStore(reducers, composeEnhancers(applyMiddleware(ReduxThunk)))
14+
1315
const App = () => (
1416
<Provider store={store}>
1517
<Router>

0 commit comments

Comments
 (0)