#renderer to main with args callback
19 messages · Page 1 of 1 (latest)
It must work flawlessly
try it first with mock inputs
checkout docs. they are very neat
Communicate asynchronously from the main process to renderer processes.
look for handle
😄
if you want to pass arguments just pass them no special case needed.
first one would be event ofcourse
also there is ipcrenderer and invoke
i think you are confused on that part ?
ipcrenderer can also be used for listeting but that would be calling from main process but in here that's just simple case
ah yes, you are passing argument to fetchdata
but not in here fetchdata: (arg) => ipcRenderer.invoke('fetchdata')
so that would be
fetchdata: (arg) => ipcRenderer.invoke('fetchdata', arg)
the arguments you want to pass are passed like that, after handle name.
although its js i don't think it should say function undefined but maybe try that