Closed davej closed 8 years ago
Great Idea! I'll try to get to it over the next few days. Any ideas for the name of the option?
I guess windowName
or windowTitle
or something like that. Another possibility is that you could read document.title
from the DOM.
Maybe have a fallback if the windowTitle
(or whatever) option isn't specified. Pseudocode:
const windowSourceTitle = options.windowTitle || document.title || rendererId;
You would probably need an additional step to ensure that window source titles are unique (I guess you could just append the rendererId).
Added in https://github.com/samiskin/redux-electron-store/pull/14 under the option sourceName
and published in v0.3.5 :+1:
I decided to just leave the default as what it currently is (window x
or webview x
), since providing sourceName: document.title
isn't much for a user to add themselves if they want it.
Awesome. Thanks!
Currently the window
source
in actions are simplywindow x
(where x is the BrowserWindow id (integer)).What do you think of the idea of allowing
redux-electron-store
to accept a customsource
option? It would make it easier to identify which window the action originated from.Generally, :+1: for this lib by the way it works very well!