O'Reilly logo

Cross-platform Desktop Application Development: Electron, Node, NW.js, and React by Dmitry Sheiko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Electron meets React

Now, we have an idea about both Electron and React. What about on how to use them together? To get a grasp on it, we will start not with our real application, but with a simple, similar example. It will include a few components and a form. The application will reflect user input in the window title. I suggest cloning our last example. We can reuse the manifest and main process script. However we have to bring the following changes to the manifest:

./package.json

{   "name": "chat",   "version": "1.0.0",   "main": "./app/main.js",   "scripts": {     "start": "electron .",     "dev": "webpack -d --watch",     "build": "webpack"   },   "dependencies": {     "prop-types": "^15.5.7",     "react": "^15.4.2",     "react-dom": "^15.4.2"   },  "devDependencies": ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required