zalmoxisus / remote-redux-devtools

Redux DevTools remotely.
http://zalmoxisus.github.io/monitoring/
MIT License
1.8k stars 138 forks source link

redux-offline incompatibility #87

Open iacopo87 opened 7 years ago

iacopo87 commented 7 years ago

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.

CaryLandholt commented 7 years ago

yep - discovered the same thing myself

MrLoh commented 7 years ago

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

CaryLandholt commented 7 years ago

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)