score:1

Accepted answer
const HAS_DEVTOOLS = typeof window === 'object' &&
  typeof window.devToolsExtension === 'function';

const store = createStore(
  rootReducer,
  defaultState,
  compose(
    applyMiddleware(thunk),
    HAS_DEVTOOLS ? global.devToolsExtension() : f => f
  )
);

Related Query

More Query from same tag