-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add docs on accessing values with invoke/handle #110
Conversation
@@ -356,6 +356,21 @@ const store = new Store({ | |||
}); | |||
``` | |||
|
|||
#### How do I get store values in the renderer process, when my store was setup in the main process? | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would mention that it's recommended to adopt this pattern even if electron-store
currently works directly in the renderer process as Electron plans to remove the remote
module.
I would also link to my explanation on how to make a singleton. A singleton is still recommended, even for just the main process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sindresorhus I added a note about it being recommended to do it this way since remote
will be removed. I am unsure where to add the link to your singleton instructions you mentioned. #15 just explains it is not a singleton, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it also explains how to make your own singleton. The The following a much safer and explicit pattern:
part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I added a note about #15. Any other changes necessary?
Thanks :) |
Is it possible at all to use IPC If so, could an example be provided for how that would work? Edit: solution found and documented in the issue I created #252 (comment) |
Closes #109