Most large facilities such as warehouses, convention centers, medical facilities, zoo parks, and museums among others seek one holistic technological platform for helping them with indoor wayfinding…
In Electron applications, you can use the ipcRenderer
and ipcMain
modules for inter-process communication. The official documentation provides a version in JavaScript. Below are the steps to implement it in TypeScript, along with the problems encountered during the process.
Use ipcMain
in the main process to set up IPC listeners:
By default, the front-end does not directly access the Electron module or use ipcRenderer. Instead, it does so through preload.ts.
In the rendering process, use the functions by window.electronAPI.
final directory structure of the files:
2. Import the front-end entry page and the preload.ts in main.ts.
3. preload.ts serves as a bridge to expose ipcRenderer to the frontend.
4. Import renderer.ts in index.html. Pay attention to the path: dist
5. the start scripts in package.json, also need to pay attention to the path: dist
If you find my article helpful, please feel free to give a tip. Your support will encourage me to keep creating!
Jual Pohon Ketapang Ketapang Kota Tangerang Selatan, Selain Peneduh Juga Mempunyai Manfaat Lain Khususnya Khasiat Zat Kimia Yang Ada Didalamnya Jual Pohon Ketapang Ketapang Kota Tangerang Selatan —…
In my previous article, I explained how you can automate the deployment of your internal Nuget packages using VSTS and how to consume them. Today, I’m going to show you how you can use a very similar…
There is an obvious joy in being scared within the context of storytelling. As a species, we seek out movies, hoping to get a taste of artificial adventure. In the case of the horror genre, we get to…