How do I use the electron module in the react component?

some local configuration information is obtained in the main process, which needs to be transmitted to the rendering process through ipcMain, but the react component cannot introduce the ipcRenderder module? Is there any solution?

Jul.11,2022

normal writing is no different
clipboard.png


"unable to introduce ipcRenderder module" why can't it be introduced? Describe your problem in detail.


introduce

const {ipcRenderer} = window.require('electron');
in the following ways
Menu