10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 208ab38 commit 6b7c05bCopy full SHA for 6b7c05b
src/demos/ipc.ts
@@ -1,5 +1,4 @@
1
-import { ipcRenderer } from 'electron'
2
3
-ipcRenderer.on('main-process-message', (_event, ...args) => {
+window.ipcRenderer.on('main-process-message', (_event, ...args) => {
4
console.log('[Receive Main-process message]:', ...args)
5
})
src/main.tsx
@@ -4,9 +4,9 @@ import App from './App'
import './index.css'
6
7
-// `nodeIntegration` needs to be enabled in the Main process.
+import './demos/ipc'
8
+// If you want use Node.js, the`nodeIntegration` needs to be enabled in the Main process.
9
// import './demos/node'
-// import './demos/ipc'
10
11
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
12
<React.StrictMode>
0 commit comments