In my renderer.js
, I need real-time site running status. There are two hooks provided in the documentation, but they do not work inside renderer.js
.
Only works inside main.js
hooks.addAction('siteStarted', (site) => {
// Do something
});
hooks.addAction('siteStopped', (site) => {
// Do something
});
In the renderer.js
file, there is a store
inside context
. How can I get the real-time site running status from that store?
Is there any other way to get the site running status from store
?
[Note: I don’t want a solution using setInterval.]
const { hooks, store, electron } = context;
I am looking forward to an optimal solution. Thanks in advance for your kind help!