title: TypeError: Object(...) is not a function in react-redux
body: <p>While I was trying to createStore in react-redux I get this strange error. I don't know why as I did this before in different app there it was working fine.</p>
  
  <pre><code>TypeError: Object(...) is not a function
  ./src/index.js
  C:/projects/facebook/facebook-react/src/index.js:14
    11 | import rootReducer from './rootReducer';
    12 | import registerServiceWorker from './registerServiceWorker';
    13 | 
  &gt; 14 | const store = createStore(
    15 |     rootReducer,
    16 |     composeWithDevtools(applyMiddleware(thunk))
    17 | );
  View compiled
  ▶ 6 stack frames were collapsed.
  </code></pre>
  
  <p>this is my file </p>
  
  <blockquote>
    <p>index.js</p>
  </blockquote>
  
  <pre><code>import { createStore, applyMiddleware} from 'redux';
  import { composeWithDevtools } from 'redux-devtools-extension';
  import thunk from 'redux-thunk';
  import { Provider } from 'react-redux';
  import App from './App';
  import rootReducer from './rootReducer';
  import registerServiceWorker from './registerServiceWorker';
  
  const store = createStore(
      rootReducer,
      composeWithDevtools(applyMiddleware(thunk))
  );
  
  
  ReactDOM.render(
  &lt;BrowserRouter&gt;
      &lt;Provider store={store}&gt;
          &lt;App /&gt;
      &lt;/Provider&gt;
  &lt;/BrowserRouter&gt;
  , document.getElementById('root'));
  registerServiceWorker();
  </code></pre>
  
  <blockquote>
    <p>rootReducer</p>
  </blockquote>
  
  <pre><code>import { combineReducers } from 'redux'; import user from './reducers/user';
  
  export default combineReducers({
      user });
  </code></pre>
  
  <blockquote>
    <p>reducer/user</p>
  </blockquote>
  
  <pre><code>import { USER_LOGGED_IN } from '../types';
  
  export default function user(state = {}, action={}) {
      switch (action.type) {
          case USER_LOGGED_IN:
              return action.user;
          default:
              return state;
      } }
  </code></pre>