Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Broken configureStore #2

Open
ilkka opened this issue Feb 25, 2018 · 1 comment
Open

Broken configureStore #2

ilkka opened this issue Feb 25, 2018 · 1 comment

Comments

@ilkka
Copy link
Contributor

ilkka commented Feb 25, 2018

const store = createStore(
rootReducer,
// initialState,
applyMiddleware(thunk),
// tslint:disable-next-line
window['__REDUX_DEVTOOLS_EXTENSION__'] &&
// tslint:disable-next-line
window['__REDUX_DEVTOOLS_EXTENSION__'](),
);

I think I dun goofed here when I put in the Redux devtools thing: I should have imported compose from redux and done this instead:

const store = createStore(
    rootReducer,
    // initialState,
    compose(
      applyMiddleware(thunk),
      // tslint:disable-next-line
      window['__REDUX_DEVTOOLS_EXTENSION__']
        ? // tslint:disable-next-line
          window['__REDUX_DEVTOOLS_EXTENSION__']()
        : // tslint:disable-next-line:no-any
          (f: any) => f,
    ),
  );
@ilkka
Copy link
Contributor Author

ilkka commented Feb 25, 2018

Now ask me why I wrote that instead of a PR :trollface:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant