klarna / electron-redux

Use redux in the main and browser processes in electron
MIT License
743 stars 94 forks source link

Renderer process store should be initialized in a synchronous matter to keep the backward compatibility #278

Closed matmalkowski closed 3 years ago

matmalkowski commented 3 years ago

V1 is using remote.getGlobal('getReduxState');, and right now v2 is using async even driven aproach, that makes the renderer store initialise in a lazy way.

To keep the differences between v1 and v2, I would rather go with default sync way of fetching the initial store data, and make the async lazy way an opt-in via options.

We could use ipcRenderer.sendSync to get it done, instead of remote package, since it works without any workarounds in all electron versions.

Please see #256 for some more discussion related to the topic

matmalkowski commented 3 years ago

Closing, since v2 supports this now since #280 released ;)

matmalkowski commented 3 years ago

:tada: This issue has been resolved in version 2.0.0-alpha.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: