我怀疑如何在单击 electro-react-boilerplate 中的按钮时将 ReactJS 文件加载到新窗口中。
const handleVideoCall=()=>{
const remote=require('electron').remote;
const BrowserWindow=remote.BrowserWindow;
const win = new BrowserWindow({
height: 600,
width: 800,
});
win.loadFile(fileName);
}
Run Code Online (Sandbox Code Playgroud)
handleVideoCall 是单击按钮时调用的方法。FileName 是我需要打开的reactjs 文件。由于没有来自反应电子样板的文档,我一直坚持这一点。任何帮助都是值得赞赏的。