Electron: Why is there no "handle" method on the ipcRenderer?

128 Views Asked by At

A bit context for the question. I am new to electron architecturing, and I'm working on an electron + angular app. I read an article saying, that we do not want to run any business logic in the main thread, to prevent blocking it at any time.

We should rather move that business logic into a new renderer process, and communicate via ipc. That's what I am trying now. I move business logic into a separate renderer thread; then the frontend asks the main thread for data, the main thread delegates it to the business-logic renderer and this one should report back to main, which responds the frontend.

For such use cases a ipcRenderer.handle method would be pretty helpful. But since there is none, I have the feeling that I am doing stuff the wrong way.

Any help understanding how electron means to handle business logic is appreciated! Thanks :)

0

There are 0 best solutions below