Getting started with Electron and React is not easy stuff, that is the reason most people use some Starter or Boilerplate repo, and That is completely fine. But with React + Electron, most of these boilerplates are missing the configuration for setting up multiple windows routing with react.
I will be discussing how you can configure routing for a web pack based Electron and React boilerplate. I will be using basic-electron-boilerplate.
What is happening inside of this repo is whenever you will open up a new window to will open up the same react instance or if you want to call it same React page. I will be helping you set up a router so you can easily handle multiple screens on multiple windows.
Let us create a component inside the src folder and call it ViewManager and paste this inside of it.
#webpack #javascript #react #reactjs #elections