The point about using electron is that you can use the browser to render the UI, and is filled with a lot of baggage. Imagine a UI rendered just for build UIs, not tied to JS or DOM or CSS, but able to work react-like.
JS isn't the problem though. V8 is pretty efficient and lightweight. The problem is that Electron pulls in all of the DOM stuff when there are lighter alternatives built into most operating systems.
The point about using electron is that you can use the browser to render the UI, and is filled with a lot of baggage. Imagine a UI rendered just for build UIs, not tied to JS or DOM or CSS, but able to work react-like.