I'd avoid electron if you're starting from scratch - it's fine if you have a web app and you're looking for a cheap way to deliver it to desktops, but it comes at a huge cost to your users. Your app will be 10X larger when users try to download it. And do you ever wonder why Slack and Atom perform so terribly and hog so much CPU and RAM compared to native apps? Electron jams in an entire web browser just to render your app. So you end up writing awful code, and you get bad performance. The only way to do something worse would be to attempt to write a desktop app in Java...
Use React Native instead!