-3

I want to show the version of Electron on my React.js web page. How can I do it?

I tried to use the ipcRender and ipcMain but I failed.

Sunil Kumar Das
  • 372
  • 1
  • 2
  • 12
  • 2
    Please take the [tour] and read [ask]. Your questions about code, i.e. debugging questions like these, are served by not only saying "I failed", but also providing the code itself, a [mre]. We are not clairvoyant, so we cannot help you to debug code you do not show us. Also showing what you have already tried to solve the problem is appreciated. Please [edit] the question accordingly. – Adriaan Jan 30 '23 at 11:16

1 Answers1

0

app.getVersion() Returns string - The version of the loaded application. If no version is found in the application's package.json file, the version of the current bundle or executable is returned.

This comment here explains it's usage with react.

Edit: You can get the electron version via process.versions.electron. It's already answered in detail here.

rahulpsd18
  • 641
  • 4
  • 12