Last active
October 8, 2020 15:57
-
-
Save adityapatnaik/1c037191c0aebb93d0febe5c1f8174cc to your computer and use it in GitHub Desktop.
Asynchronous Reply: App.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button onClick={()=>{ | |
ipcRenderer.send('anything-asynchronous', 'ping') | |
// reply | |
ipcRenderer.on('asynchronous-reply', (event, arg) => { | |
console.log("Hiii",arg) // prints "Hiii pong" | |
}) | |
}}> | |
Async | |
</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment