Closed jhen0409 closed 8 years ago
Something along the lines of this is what I did:
let storeEnhancers = compose(
...
applyMiddleware(thunk, logger)
);
if (process.type === 'renderer' && !process.guestInstanceId) {
let DevTools = require('DevTools');
storeEnhancers = compose(
storeEnhancers,
require('DevTools').instrument()
);
}
let store = storeEnhancers(createStore)(reducer);
process.type === 'renderer'
ensures that I'm not in the browser process, and !process.guestInstanceId
ensures I'm not in a webView.
What I actually did in our production code was I separated BrowserStore and RendererStore and exported one based on what process I was in (since there were some other custom details).
Renderer
It seems obvious, the UI actions of LogMonitor cannot be apply to main process store, any plans to solve this problem?