Move IPC listeners to separate classes

This commit is contained in:
Patrick Fic
2020-10-13 19:52:13 -07:00
parent 030f0b7a90
commit c6f424cf5f
5 changed files with 24 additions and 3 deletions

View File

@@ -15,9 +15,7 @@ export function JobsPage() {
ipcRenderer.on("test-success", (event, obj) => {
console.log("Test Success", obj);
});
ipcRenderer.on(ipcTypes.default.filewatcher.startSuccess, (event, obj) => {
console.log(ipcTypes.default.filewatcher.startSuccess, obj);
});
// Cleanup the listener events so that memory leaks are avoided.
return function cleanup() {
ipcRenderer.removeAllListeners(

View File

@@ -0,0 +1,9 @@
import React from 'react'
export default function IpcListeners() {
return (
<div>
</div>
)
}