Skip to content

StoreManager should take an enhancer object #35

@HerbCaudill

Description

@HerbCaudill

Currently the StoreManager constructor takes an array of middlewares.

export const storeManager = new StoreManager({
  databaseName: 'todo',
  proxyReducer,
  initialState,
  urls,
  middlewares: [logger],
})

To maintain consistency with the Redux createStore interface, this should accept a StoreEnhacer:

export const storeManager = new StoreManager({
  databaseName: 'todo',
  proxyReducer,
  initialState,
  urls,
  middlewares: applyMiddleware([logger]),
})

I think the difficulty had to do with composing an existing enhancer with the Redux Dev Tools browser extension here:

https://github.com/DevResults/cevitxe/blob/dffe4ac90008f0777e16fb6170d2d1b88f0c0ef2/packages/core/src/StoreManager.ts#L72-L79

We haven't really used the Redux Dev Tools, so we could just not wire it up. Or we could figure out how to make it work. See http://github.com/zalmoxisus/redux-devtools-extension#1-with-redux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions