Basicly I want the renderer to constantly listen for the message from and preload can send the message to renderer anytime. Basicly my scenario is:
- Whenever user copies anything to clipboard, the main process will send the message to preload via webContents.send("clipboard-updated");
- Main process will save the newly received clip into the database.
- Preload will send the message to the renderer upon receiving the message from the main.
- Render will fetch the data from the database again and will refresh the UI. this is the whole scenario and here I'm unable to figure out that how do I send the message to renderer so that it can refresh the UI.