How to implement Reactjs in an Electron application?

Asked

Viewed 223 times

2

Hello, good, I’m starting an application on Electron, but let’s say I did it in two parts, one part, the Electron, the configuration is ok, only the other part I did in other files using Reactjs, which is relatively ready, some adjustments are missing. My question is the following, how do I make that part I did in Reactjs I implement in Electron?

I will not be able to show the codes because it would be complicated, but to try to facilitate I will put some prints of the folders.

Esta é a pasta onde o Electron está, sendo que o arquivo principal é o main.js que é onde configuro o Electron, os htlms digo que seriam irrelevantes para tal dúvida. E o package.json colocarei em outro print.

Eu cheguei a instalar o react mas como não sei o fazer então não fui adiante.

Aí é o "puclic" do React, que diria que é irrelevante também para tal problema

E aqui é onde a parte do React funciona. No App.js mas especificadamente no render, seria outra browserWindow do Electron. O index.js seria o "main", estarei colocando um print. E o registerServiceWorking.js vou dizer que não sei muito bem para que serve.

E este como disse, é o index, onde ele importa as coisas(não sei o termo correto para este caso).

First image. This is the folder where Electron is, and the main file is the main.js which is where I set up Electron, htlms say would be irrelevant to such doubt. And package.json I’ll put in another print.

Second image. I came to install React but as I don’t know what to do so I didn’t go ahead.

Third image. There is the "puclic" of React, which I would say is irrelevant also for such a problem.

Fourth image. And this is where the React part works. In App.js but specifically in render, it would be another Electron browser. The index.js would be the "main", I will be putting a print. And registerServiceWorking.js I will say that I do not know very well what it is for.

Fifth image. And this as I said, is the index, where it matters things(I don’t know the correct term for this case).

And to be clear, I’m new to such subjects and Stackoverflow, sorry if the formatting went bad. And in case anyone wants me to clarify something that I haven’t made clear, just say the word and I’ll be clear. And I apologize if you have not understood anything else. I hope you have given to understand. Thank you already.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.