Skip to content

Preload Info. #22

Answered by Deluze
loriswave asked this question in Q&A
Sep 6, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

No worries. My bad that is caused confusion in the first place!

The electron.ts module was personal preference. I've added electron.ts in the renderer so I could import Electron modules directly instead of having to access the electron object on the window object.

import { ipcRenderer } from 'electron';

ipcRenderer.send(...);

instead of

window.electron.ipcRenderer.send(...);

You can choose to not use the electron module at all as both snippets are completely valid, in that case you can remove the file completely as it becomes obsolete.

Hopefully this clears up some of the confusion!

Since I want this template to be as simple as possible, I'm considering to remove this electron.ts module …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@loriswave
Comment options

@Deluze
Comment options

Answer selected by Deluze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants