olioapps / sitka

MIT License
19 stars 2 forks source link

Request Adding Compose Enhancer Option #2

Open mdhawley opened 5 years ago

mdhawley commented 5 years ago

It would be nice to be able to add compose enhancers. Redux DevTools uses a custom compose method: window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__

Currently I don't see a way to implement this, but adding an option would allow use of these tools. Something like this:

App Code

const composeEnhancer = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;

const store = createAppStore({
  initialState,
  composeEnhancer,
  ...

Sitka Code

const composer = composeEnhancer || compose;
const store: Store = createStore(
  composer(...storeEnhancers, applyMiddleware(...combinedMiddleware)),
  ...
)
rachoac commented 5 years ago

Thanks -- I will take a look