Closed Treverix closed 4 years ago
As of electron 10, the remote is removed by default. We can get it back (until electron 14) by adding enableRemoteModule=true
to the webPreferences
:
const w = new BrowserWindow({
webPreferences: {
enableRemoteModule: true
}
})
This is required if we want to use this version of electron-redux with electron 10+ (did it on my project and it works again). I recommend adding some info message to the readme :)
@Treverix thanks for pointing at it!
I've updated the readme, does it seem fine to you?
Looks good :) And one day you'll need to build an electron-redux without using remote.getGlobal and probably using invoke/handle instead of send/on/once (it is my understanding that ipcRenderer.send/sendSync will be removed also when the remove module is dropped)
But there'll be @electron/remote as a new 3rd party (userland?) package if we want to keep using some remote.
:tada: This issue has been resolved in version 2.0.0-alpha.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
https://github.com/hardchor/electron-redux/blob/253ae990f61addf7fe6ab362f4440bd344e81b35/packages/electron-redux/src/helpers/getInitialStateRenderer.js#L4
This line crashes with electron 10.x
This is because of the planned decommissioning of
remote
.