Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Basic pattern for using an main process only API in either the main or renderer in Electron
const electron = require('electron');
const Menu = electron.Menu || electron.remote.Menu;
//now you can use it seamlessly in either main or renderer
console.log(Menu);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.