Skip to content

Commit

Permalink
docs(preload): update
Browse files Browse the repository at this point in the history
  • Loading branch information
alex8088 committed Jun 4, 2023
1 parent 0dbd764 commit 506c922
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/preload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ window.electron.ipcRenderer.invoke('electron:doAThing', '').then(re => {
window.electron.ipcRenderer.on('electron:reply', (_, args) => {
console.log(args)
})

// Remove Listener
const removeListener = window.electron.ipcRenderer.on('electron:reply', (_, args) => {})
removeListener()
```

**Note**: If you're building your Electron app with TypeScript, you may want to get TypeScript intelliSense for the renderer process. So that you can create a `*.d.ts` declaration file and globally augment the `Window` interface:
Expand Down

0 comments on commit 506c922

Please sign in to comment.