electron-react-boilerplate / electron-react-boilerplate/electron-react-boilerplate

How to correctly structure my app?

Closed
#3,480 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
24.3k
Forks
4k
Avg merge
20m
Merged PRs (30d)
4

Description

I was thinking of creating an idle-game with electron and liked the idea of React and Webpack support. But I have some questions about how this project works.
The preload defines an object which contains generic handlers for on,send and once. I'm having problems sending messages from main to the renderer through these channels using "mainWindow?.webContents.send('ipc-example', ['message']);" isn't this how I'm supposed to use it?
Also would it be advisable to place the core loop in main and have it send out messages, or would it be more appropriate to use the provider-pattern and run all loops from there and only message main when I need to save to file or otherwise access the system?
Thanks for any help

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.