Search code examples
javascriptreactjselectrondesktop-application

When to use react with electron


I plan on making a desktop only app. I don't have any intent to deploy it to a web server. Think something like VS code.

Im used to just "throwing" react at any problem that has the term "web application" in it. It streamlines so much its almost impossible to write really great apps without it in my opinion.

However, electron is a different beast entirely. Should I use react still, or is there more benefit to just sticking with raw electron in my case? I'm fairly new to development in electron, so I would like to do it right.


Solution

  • Electron is actually Chromium browser on the front end and nodejs on the backend. Building an electron app is technically building a webpage which ships its back end along with it.

    If you have a dynamic application that needs to rerender frequently, ReactJS’s virtual DOM will be super effective

    So, if you're used to 'throwing' react at any problem that has the term 'web application' in it, i would suggest you go with reactjs.