Skip to content

Instantly share code, notes, and snippets.

@pixelprodev
Created May 19, 2017 21:26
Show Gist options
  • Select an option

  • Save pixelprodev/29d518ed02b16175f31af7b52dc6feed to your computer and use it in GitHub Desktop.

Select an option

Save pixelprodev/29d518ed02b16175f31af7b52dc6feed to your computer and use it in GitHub Desktop.
same output
export function generateStore ({mode = (process.env.NODE_ENV || 'test'), injectedState = {}}) {
return mode === 'development'
? createStore(reducers, injectedState, composeWithDevTools(applyMiddleware(sagaMiddleware)))
: createStore(reducers, injectedState, applyMiddleware(sagaMiddleware))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment