Event Emitters in Electron: ipcMain.on vs electron.powerMonitor.on


#1

screenshot 2016-12-27 11 16 10

I’m using a method to set a schedule with a value, sometimes this value comes from a settings file, other times it comes from a user selection.

Calling from render.js works, it uses the newly provided value, but calling from electron.js uses the value it obtained when the app loaded, when what I really want it to do is retrieve a new value from storeSettings.getItemSync('schedule').

Please see gist: https://gist.github.com/komplexb/2f5765f78111f07e4d84ce064893431c