Redux-devtools: Bad error when you forget to pass empty config to __REDUX_DEVTOOLS_EXTENSION_COMPOSE__()

Created on 19 Mar 2018  路  3Comments  路  Source: reduxjs/redux-devtools

Hi,

I'd be happy to PR this if someone points me to the correct file but currently if you forget to pass an empty config object to __REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) you get a really vague error and this could make finding the problem really hard as the app never starts, you don't end up with a useful stacktrace and the error is below. I'd propose adding an error that explains the problem or even better might be to just default the first parameter to empty object.

Uncaught TypeError: a.subscribe is not a function
    at init (<anonymous>:1:24948)
    at <anonymous>:1:27042
    at createStore (createStore.js:51)
    at createStore (store.js:33)
    at Object../src/index.js (index.js:19)
    at __webpack_require__ (bootstrap c7ee569b782a1b33086d:678)
    at fn (bootstrap c7ee569b782a1b33086d:88)
    at Object.0 (templates.validations.js:23)
    at __webpack_require__ (bootstrap c7ee569b782a1b33086d:678)
    at bootstrap c7ee569b782a1b33086d:724
    at bundle.js:728
feature

Most helpful comment

Plus 1

All 3 comments

Plus 1

I think you're looking for redux-devtools-extension.

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mauron85 picture mauron85  路  7Comments

garrettheel picture garrettheel  路  8Comments

MethodenMann picture MethodenMann  路  7Comments

lcxfs1991 picture lcxfs1991  路  10Comments

leoasis picture leoasis  路  11Comments