Using remote API in renderer process


I am curious if there is any downside of using remote API in renderer process, does anyone know the answer or faced any complexity of doing so?


According to the docs, the remote API is only used in the renderer process, to communicate with the main process. Is there something that you’ve read that indicates otherwise?


Thanks for reply, no I have not read anything stating otherwise, I was just curious since electron provide IPC to communicate between renderer and main that what is the use of remote


That page tells you exactly why both exist.

In Electron, GUI-related modules (such as dialog, menu etc.) are only available in the main process, not in the renderer process. In order to use them from the renderer process, the ipc module is necessary to send inter-process messages to the main process. With the remote module, you can invoke methods of the main process object without explicitly sending inter-process messages, similar to Java’s RMI.