Skip to content

After update to 2.0, REHYDRATE or online status actions no longer fire #62

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

Closed
dmt0 opened this issue Apr 19, 2017 · 1 comment
Closed

Comments

@dmt0
Copy link

dmt0 commented Apr 19, 2017

Basically I don't see any of the redux-offline actions firing after the upgrade to 2.0. Here's my store configuration:

export default function configureStore(initialState) {
  const debugware = (process.env.NODE_ENV === 'production') ? [] : [createLogger({ collapsed: true, predicate: () => ((process.env.NODE_ENV === 'development') || (process.env.NODE_ENV === 'test')) })]

  const store = createStore(
    rootReducer,
    initialState,
    (process.env.NODE_ENV === 'development') ?
      compose(
        applyMiddleware(thunkMiddleware, ...debugware),
        // window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f, // eslint-disable-line no-underscore-dangle
        offline({ ...offlineConfig, persistOptions: { storage: LocalForage } }),
      ) :
      compose(
        applyMiddleware(thunkMiddleware, ...debugware),
        offline({ ...offlineConfig, persistOptions: { storage: LocalForage } }),
      ),
  )

  if (module.hot) {
    // Enable Webpack hot module replacement for reducers
    module.hot.accept(['./common/modules', './admin/modules', './attendee/modules'], () => { store.replaceReducer(rootReducer) })
  }

  return store
}
@MatthieuLemoine
Copy link

I think that this is link to #77 & reduxjs/redux#1051.
Redux-offline actions are only dispatched in the enhanced redux-offline store and so you can't see them in the redux devtools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants