I'm new to Electron and I am clueless as to how to access the Electron's process object from my app.js component.
This is my function createWindow
function createWindow() {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: { nodeIntegration: true },
});
mainWindow.loadURL("http://localhost:3000/");
mainWindow.on("closed", function () {
mainWindow = null;
});
}
And this is my app.js component
class App extends React.Component {
componentDidMount() {
console.log("process", process);
}
render() {
return <h1>Hello</h1>;
}
}
At the moment, I am able to launch the app and the render app.js, but I can't access the process object from there.