Skip to content
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

More freedom to compose #184

Closed
stvmachine opened this issue Sep 2, 2019 · 1 comment
Closed

More freedom to compose #184

stvmachine opened this issue Sep 2, 2019 · 1 comment

Comments

@stvmachine
Copy link

stvmachine commented Sep 2, 2019

I'm using redux-offline and that library requires a specific order for theirenhancer. More info

// order required for the offline enhancer. 
compose(
        offlineEnhancer.enhanceStore, // <-- this one has to be added before the middleware
        applyMiddleware(offlineEnhancer.middleware)
    )

But on this library, the order is per default the opposite:

// redux-starter-kit/src/configureStore line 143
  const storeEnhancers = [middlewareEnhancer, ...enhancers]
  const composedEnhancer = finalCompose(...storeEnhancers) as StoreEnhancer

  return createStore(
    rootReducer,
    preloadedState as DeepPartial<S>,
    composedEnhancer
  )

Can we have a workaround to allow this kind of scenario?. Both libraries are great and I would like to use it together.

@stvmachine
Copy link
Author

This ticket is related: #39

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

1 participant