Want a framework for React and Electron


This is wishlist for developing Electron apps in React

I want to take an existing React app and “wrap” it in Electron
and also customise it for Electron by:

  1. adding IPC communication
  2. adding menu’s
  3. etc

The objective is to:

  1. maximum code reuse across the React and the Electron app
  2. add web and desktop specific features. css, js or components which are loaded based on the context
  3. Electron app is always updated like how a website is always updated. can sacrifice offline for this ie. load a url and not a file. and even for supporting offline, it works like a react app (ie. service workers) rather than a file url (ie. the electron app)

PS: for (2) above can assume that, files are named with an electron prefix or a web prefix
ie. header.web.css and header.electron.css

electron-forge is nice but it has its own opinion on how to transpile code.
it seems good for a new app. But when we have an existing React app with its own unique
build process, eg. with its own babel plugins etc. Then not sure how electron-forge will work
It does not work with node-sass as well. I also like how it always uses electron-rebuild

Basically want to warp an existing React codebase without assuming anything about the web build process

some common patterns can be transpiled hopefully:

  1. use electron-devtools-installer automatically
  2. use hashHistory for react-router rather than borwserHistory

The other project which i like is electron-react-boilerplate
But it is a bit too complicated for my taste. And I do not use/like some of the parts:

  1. flow
  2. tcomb
  3. file organization

But these are all nitpicks and electron-react-boilerplate rocks React + Electron :thumbsup:
The author has put in lot of effort and thought into it.

On the other hand, would have liked the developer UX to have been similar to create-react-app

So i want to merge these three projects:

  1. electron-react-boilerplate
  2. electron-forge
  3. create-react-app

Would people be interested in something like this ?

TL;DR: My question is:

  1. What is easiest way to wrap an existing React app in an Electron app. and add Electron specific features
  2. Is there anything similar to electron-react-boilerplate + electron-forge + create-react-app ?


This is not a framework but the article shows, “How to build an Electron app using create-react-app. No webpack configuration or “ejecting” necessary.”.