remote-redux-devtools icon indicating copy to clipboard operation
remote-redux-devtools copied to clipboard

redux-offline incompatibility

Open iacopo87 opened this issue 8 years ago • 3 comments

Hello, I notice that this tool is incompatible with redux-offline https://github.com/jevakallio/redux-offline. If i use composeWithDevTools redux-offline is not working :(

const store = createStore(reducer, /* preloadedState, */ composeWithDevTools(
  applyMiddleware(...middleware),
  offline(offlineConfig)
));

If I instead use compose it works.

const store = createStore(reducer, /* preloadedState, */ compose(
  applyMiddleware(...middleware),
  offline(offlineConfig)
));

could you please check it?

Thanks.

iacopo87 avatar Jun 13 '17 09:06 iacopo87

yep - discovered the same thing myself

CaryLandholt avatar Aug 06 '17 00:08 CaryLandholt

I have this issue as well. Any idea what's going on or how to fix it?

MrLoh avatar Aug 12 '17 16:08 MrLoh

this worked for me

const enhancer = composeWithDevTools(
  applyMiddleware(...middleware),
  offline(offlineConfig),
  // Add this to the end of your enhancer chain:
  createStore => (reducer, preloadedState, enhancer) => enhancer(createStore)(reducer, preloadedState),
)

const store = createStore(reducer, /* preloadedState, */enhancer)

CaryLandholt avatar Aug 12 '17 23:08 CaryLandholt