Questions tagged [electron-react]

16 questions
1
vote
0 answers

How to use electron-redux in electron and react app to share state in multiple react renderer processes

I use electron and react to build desktop application, in the way electron-redux works you need to import the reducers in the main and in the renderer processes as well , in case of react you can not import files outside of src folder, and by…
Yosh
  • 39
  • 6
1
vote
2 answers

Write operation is not working on Files in Production Environment (Electron App)

In our electron app, there is a need to update a file with user-entered data (Using node fs module to update the file). It works fine in Development environment, but not working in Production Environment. Do we need to take care of any additional…
Rama Rao M
  • 2,961
  • 11
  • 44
  • 64
0
votes
0 answers

How to run a process in background in Electron application

I have some sought-of Desktop OCR application that is being developed in ReactJs. PDFjs library is used to read the PDF when the scan button is clicked. I would like to run this process in the background because one user tries to interact with other…
Qasim Ali
  • 587
  • 2
  • 11
  • 28
0
votes
2 answers

Issue with ipcMain.handle() not returning any value to ipcRenderer.invoke()

So, I struggled with this problem for 2 days, looking in the API documentation of Electron.js and various sites and you guys are my last hope: Here are the 3 files related to the issue: main.ts (not the entire file): app.whenReady().then(() => { …
Dan149
  • 46
  • 3
0
votes
0 answers

External URLs don't open in webview

i'm making electron app using npm create electron-vite (typescript, react). To load url, I'm using webview. It works fine, but external urls don't open, new-window and setWindowOpenHandler just not called. app.on("web-contents-created", (e,…
0
votes
1 answer

Electron React - How to fetch local JSON file data before App Component renders?

Hello I'm building a Electron + React + Node app. I need to import data from my app-config.json file into both my server.js(contains server side logic) and my App.js file. This is my project…
0
votes
1 answer

Electron React 404 not found in production

I am building an electron app with react.js. It works fine in development mode but does not work in production mode. I have added the main folder inside the public and you can see my production error in the URL in the main.js code. My folder…
0
votes
0 answers

Electron send data to react with preload.js

I am trying achieve something where I can directly send data to react and where in react whenever it receives it does something. So my electron.js is in below format. // ./public/electron.js const path = require("path"); const { app,…
Hack Try
  • 471
  • 4
  • 17
0
votes
1 answer

How do I create dynamic number of elements in React outside of JSX?

In a electron-react app I run a shell command and the output is received line by line, how do I create elements dynamically and add it to DOM? I use this method which works but, is there a better way to do this? import Titlebar from…
0
votes
1 answer

Electron embedded React App in Iframe does not release memory on closing

I have long term running Electron/react app with another react app inside an iframe. The problem arise when i open and close iframe many times and remove it from the DOM. The embedded app doesn't get unloaded all the way, there is always some…
0
votes
0 answers

Electron Forge: Preload.js running twice when starting the application

I am new to electron and working with Electron forge 6 with React as Ui Library with Webpack template. The issue is I want to spawn a process and I am executing the process in preload.js but the preload.js is running twice causing issue in the…
0
votes
2 answers

how to close or minimize or maximize app in react electron

I'm building a react-electron app. I created a custom window header but I can't access app.quit() & a.*() in my project. app.js(react): i tried both type : 1.import electron from "electron"; 2.const electron = require('electron')
0
votes
0 answers

Move from using renderer.ts in electron to preload.ts for electron-find

So I'm trying to use the electron-find package to implement "Cmd+F" find function in my electron-react application. The example the author shows for usage requires me using "require" and "remote" in the renderer but I want to be able to use…
0
votes
0 answers

Render content returned from an API in child window electron react application

I have an electron react application, the scenario I’m unable to get it to work is, on the main window, on clicking a button, I want to call the main process which makes a gRPC call to an external server, gets data back and renders the data in a…
Nitesh
  • 191
  • 1
  • 3
  • 7
0
votes
0 answers

Electron-log is causing electron app to reload

I am using the electron-todo template and trying to create a log file that recovers the data in the event of a crash. The app reloads every time the log file is updated. How would I prevent the app from reloading every time? I intended the logging…
1
2