I'm writing an app with the electron-react-boilerplate framework.
I've been following a tutorial here: https://riptutorial.com/electron/example/19713/synchronous-ipc-communication
In my renderer process I have:
let a = window.electron.ipcRenderer.sendSync('LIST', []);
console.log(a);
and in my main process:
ipcMain.on('LIST', (event) => {
event.returnValue = 'test';
});
However the value 'a' is undefined when it is logged. What am I doing wrong?