question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It looks like you are passing several store enhancers to createStore()

See original GitHub issue

React Native Debugger app version: v0.8.1 React Native version: 0.57.3 Platform: iOS Is real device of platform: No Operating System: macOS

I am getting this error

It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function

It was working before I updated from 0.55.

This is how I create my store.

import { createStore, compose, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import reducers from '../reducers';

const store = createStore(
  reducers,
  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
  compose(applyMiddleware(thunk)),
);

export default store;


It works fine when I use Chrome to debug.

Please help, thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:23
  • Comments:13

github_iconTop GitHub Comments

392reactions
TomboFrycommented, Oct 23, 2018

I’ve just had this same problem with almost exactly the same code, and have managed to fix it.

Instead of passing three arguments to the createStore function, you need to pass two. To get around that, while still using the redux dev tools, you need to use the dev tools as the composer itself:

import { createStore, compose, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import reducers from '../reducers';

const composeEnhancer = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;

const store = createStore(
  reducers,
  composeEnhancer(applyMiddleware(thunk)),
);

export default store;

I realised this was the solution after digging around the redux library’s, the debugger app’s, and the dev tool’s source code, and found this section: https://github.com/zalmoxisus/redux-devtools-extension#12-advanced-store-setup

Hope this helps!

78reactions
SirFart4lotcommented, Nov 13, 2018

redux dev tool extension wrap your actions with it’s own action, what you can do is change the order of the middlewares load,

const store = createStore(
    rootReducer,
    compose(
        applyMiddleware(
            /* ----  middlewares ----  */
           
        ),
        window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
    )
);

if you place the the redux devtools middleware before your middlewares, you will get the warped action.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Error passing several store enhancers to createStore()
Error: It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a ...
Read more >
Error passing several store enhancers to createStore()-Reactjs
You can use a package to persist the redux store into the local storage and you ... It looks like you are passing...
Read more >
Error: It looks like you are passing several store enhancers to ...
Error: It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single...
Read more >
Configuring Your Store - Redux
To use multiple enhancers, you must first compose them into a single larger enhancer, as shown in this example. Finally, we pass this...
Read more >
Redux-DevTools Error: It looks like you are passing ... - Szhshp
It looks like you are passing several store enhancers to createStore(). ... const store = createStore( Reducer, /* reducer */ window.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found