I am creating an application to use mysql. I want to call a function from the main.js file. This main.js file is the main application file, just like the documentation. I saw an example of how to call this function:
const { remote } = require('electron');
const main = remote.require('./main');
main.saveUser();
But it gives the following error:
Uncaught TypeError: Cannot read property 'require' of undefined at app.js:4'
I believe it has updated and the way of calling has changed, can someone help me by sending the link to the documentation that talks about, please.