samiskin / redux-electron-store

⎋ A redux store enhancer that allows automatic synchronization between electron processes
MIT License
375 stars 32 forks source link

Is there a way to dispatch actions from main? #15

Closed juliuszc closed 8 years ago

juliuszc commented 8 years ago

Currently, when I try to dispatch an action from main, I get an uncaught exception: "Cannot assign to read only property 'source' of ACTION at store.dispatch. Sorry, if I'm trying to do something dumb.

samiskin commented 8 years ago

Hm strange, dispatching should work regardless of whether its from the main process or outside. Right now I assign action.source, so maybe that's conflicting with another library? Could you try removing redux-electron-store, then see if theres anything currently set with action.source, or maybe something making action read-only?

juliuszc commented 8 years ago

Sorry, turns out I was just doing something dumb!

samiskin commented 8 years ago

No problem, its a reasonable case that the action object might be frozen in some way, so I should deal with it :+1: Thanks for pointing it out!