import { ipcRenderer } from 'electron'; ipcRenderer.send('message', 'Hello from renderer');
import { ipcRenderer } from 'electron'; ipcRenderer.on('message', (event, payload) => { console.log(payload); });In the above example, we use the `on()` method of `ipcRenderer` to listen for messages on the `message` channel. When a message is received, the callback function is called with the event object and the payload of the message as arguments. Package Library: typescript-electron-ipc