Use default electrons menu with React

I’m very new with the Electron and currently trying to build desktop application. So currently I’m trying to use React. My question is can we use the electron menu bar and context menu ??

1 Like

Sure, I just started using Electron as well. I went with electron-react-boilerplate (sorry I couldn’t put more than two links, so see the link below) because it had everything I needed to prototype something really quick with Electron/React.

Regarding the native menu bar, it’s in this file: https://github.com/electron-react-boilerplate/electron-react-boilerplate/blob/master/app/menu.ts, it’s pretty straightforward.

AFAIK this project doesn’t have any context menus but you would use the same Menu class to build a context menu like you use to build a native menu: https://www.electronjs.org/docs/api/menu.

1 Like