728x90
๋ฐ์ํ
[@electron/remote ๋ชจ๋ ํ์]
// In the Renderer
const { BrowserWindow } = require('@electron/remote')
// In the main process:
require('@electron/remote/main').initialize()
[renderer.js]
const { ipcRenderer } = require('electron')
//to minimize
ipcRenderer.send('minimize', data);
[main.js]
const { ipcMain } = require('electron')
ipcMain.on('minimize', (event, data) => {
//Minimize logic
})
์ถ์ฒ:
https://stackoverflow.com/questions/67419723/how-to-switch-from-remote-to-ipcmain-and-ipcrenderer
How to switch from remote to ipcMain and ipcRenderer?
I am making electron app with react and I have titlebar controls done with remote module but in console I am getting warning that remote module is deprecated. I want to change my code to use ipcMai...
stackoverflow.com
728x90
๋ฐ์ํ
'๐ฅ๏ธํ๋ก ํธ์๋ > Electron.js' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Electron - Preload์์ npm ๋ชจ๋ ์ฌ์ฉํ๊ธฐ (0) | 2022.10.31 |
---|---|
Electron - loadURL๋ก ๋ฌธ์ ๋ถ๋ฌ์จ ํ์ ์๋ฐ์คํฌ๋ฆฝํธ ์คํ (0) | 2022.04.01 |
Electron - Tray ์์ฑ ๋ฐ ํด๋ฆญ ์ด๋ฒคํธ, Tray ์์ด์ฝ ๋ณ๊ฒฝ (0) | 2022.03.28 |
Electron - ๋ง์ฐ์ค ๋๋๊ทธ๋ก ์ฐฝ ์์ง์ด๊ธฐ (0) | 2022.03.28 |
Electron - ๋ก๋๊ฐ ๋ค๋ํ์ ์ฐฝ ๋์ฐ๊ธฐ (0) | 2022.03.27 |