Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

398
Views
¿Cómo usar @electron/remote para crear una nueva ventana de navegador en ReactJS?

Estoy trabajando en una aplicación en Electron y ReactJS. Necesito crear un nuevo BrowserWindow desde el componente de reacción, pero esto no funciona, y la nueva ventana en la consola tiene el error @electron/remote is disabled for this WebContents. Call require("@electron/remote/main").enable(webContents) to enable it.

Principal.js

 const mainWindow = new BrowserWindow({ width: 1280, height: 720, show: false, webPreferences: { nodeIntegration: true, enableRemoteModule: true, contextIsolation: false, webSecurity: false }, }) require("@electron/remote/main").initialize(); require("@electron/remote/main").enable(mainWindow.webContents);

Reaccionar componente

 function createWindow () { let win = new BrowserWindow({ webPreferences: { nodeIntegration: true, contextIsolation: false, webSecurity: false }, }) window.require("@electron/remote/main").enable(win.webContents); win.loadURL('http://localhost:3000/overlay') } createWindow()

¿Cómo puedo crear una nueva ventana del navegador?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!