Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with electron 14+ anymore #317

Open
Treverix opened this issue Sep 2, 2021 · 8 comments
Open

Does not work with electron 14+ anymore #317

Treverix opened this issue Sep 2, 2021 · 8 comments

Comments

@Treverix
Copy link

Treverix commented Sep 2, 2021

The module can't be used with electron 14 or higher. Electron 14 has no remote module anymore, we need to use @electron/remote instead, but the library still depends on the existance of electron.remote.

The alpha version also seems to be affected, at least I can't find @electron/remote listed in the package.json.

Uncaught TypeError: Cannot read properties of undefined (reading 'getGlobal')
    at getInitialStateRenderer (C:\...\node_modules\electron-redux\dist\helpers\getInitialStateRenderer.js:11)
@Treverix
Copy link
Author

Treverix commented Sep 3, 2021

#314 seems to fix it. The ipc channel name there should probably be changed to some UUID or get-redux-state-<shortuuid> to further reduce the risk of channel name clashes, just in case a user has a channel with the same name already (also electron will report an error, if a channel is created twice for the same name)

@seanmacisaac
Copy link

We use electron-redux and would like to move Electron >= 14, any update on this issue?

@Treverix
Copy link
Author

@seanmacisaac - it works with the 2.x version. I migrated my project and I'm on electron 14 since a while (with electron-redux)

@caligo-erik
Copy link

@seanmacisaac - it works with the 2.x version. I migrated my project and I'm on electron 14 since a while (with electron-redux)

Does the electron-redux usage change?
I tried to upgrade to version 2 (alpha), and none of the usual functions can be found:

  • forwardToMain
  • replayActionRenderer
  • forwardToRenderer
  • replayActionMain

@matmalkowski
Copy link
Collaborator

Yes, the API has changed (hence this is breaking version update) - You can see examples how to use new api in the examples / tests

@caligo-erik
Copy link

Yes, the API has changed (hence this is breaking version update) - You can see examples how to use new api in the examples / tests

Thanks!
I did check the examples and tests at first, but I had forgotten to change the branch from master to alpha. :D
I'll look into this tonight.

@vitordino
Copy link

hey, i was also interested on react-redux but the fact that it wasn’t being maintained nor compatible with latest electron versions motivated me to write a really thin library that could replace it (started from scratch, so it didn’t made much sense to back-port it to here)

it’s called reduxtron and i’ve just wrote a blog post about the journey and my motivations behind it

@caligo-erik
Copy link

hey, i was also interested on react-redux but the fact that it wasn’t being maintained nor compatible with latest electron versions motivated me to write a really thin library that could replace it (started from scratch, so it didn’t made much sense to back-port it to here)

it’s called reduxtron and i’ve just wrote a blog post about the journey and my motivations behind it

I will definitely check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants