Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error when applying the devtools #70

Closed
timothyjlaurent opened this issue Mar 4, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@timothyjlaurent
Copy link

commented Mar 4, 2016

e.apply isn't a function .

If I un-minify the source with the {} button I get an error on line 1703

image

Not sure what is going on.

@zalmoxisus

This comment has been minimized.

Copy link
Owner

commented Mar 4, 2016

Please run the extension in dev mode to see more meaningful error messages.

@timothyjlaurent

This comment has been minimized.

Copy link
Author

commented Mar 5, 2016

Thanks,

So it looks like this is happening here:

image

It is downstream from applyMiddleware's compose.
image

It's being applied like this:

const store = createStore(
  reducer,
  applyMiddleware(
    thunkMiddleware,
    reduxRouterMiddleware,
    socketMiddleware,
    socketEventTranslationMiddleware,
    sagaMiddleware,
    loggerMiddleware,
    window.devToolsExtension ? window.devToolsExtension() : f => f
  )
)
@zalmoxisus

This comment has been minimized.

Copy link
Owner

commented Mar 5, 2016

The extension should be applied as a store enhancer not as a middleware. So, it should be:

const store = createStore(
  reducer,
  compose(applyMiddleware(
    thunkMiddleware,
    reduxRouterMiddleware,
    socketMiddleware,
    socketEventTranslationMiddleware,
    sagaMiddleware,
    loggerMiddleware),
    window.devToolsExtension ? window.devToolsExtension() : f => f
  )
)

As indicated here. Just don't forget to also import { compose } from redux.

@timothyjlaurent

This comment has been minimized.

Copy link
Author

commented Mar 7, 2016

Thanks for the help
On Sat, Mar 5, 2016 at 12:20 AM Mihail Diordiev notifications@github.com
wrote:

The extension should be applied as a store enhancer not a middleware. So
it should be:

const store = createStore(
reducer,
compose(applyMiddleware(
thunkMiddleware,
reduxRouterMiddleware,
socketMiddleware,
socketEventTranslationMiddleware,
sagaMiddleware,
loggerMiddleware),
window.devToolsExtension ? window.devToolsExtension() : f => f
)
)

As indicated here
https://github.com/zalmoxisus/redux-devtools-extension#2-use-with-your-favorite-flux-implementation.
Just don't forget to also import { compose } from redux;


Reply to this email directly or view it on GitHub
#70 (comment)
.

@zalmoxisus zalmoxisus closed this Mar 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.