firu is a simple library which allows you to:
- create Electron's BrowserWindow with only script file instead of html file.
- simply sending data from main process to renderer process.
- calling functions in main process from renderer process.
- functions that simplify using firu with React
import { FiruWindow } from "firu/native";
const path = "./path/to/script";
const options = {};
const win = new FiruWindow(path, options);
import { FiruWindow } from "firu/native";
const path = "./path/to/script";
const options = {
data: {
msg: "Lorem ipsum",
foo: () => console.log("foo")
}
};
const win = new FiruWindow(path, options);
import { firu } from "firu/dom";
firu.whenReady().then(() => {
console.log("msg:", firu.data["msg"]);
firu.data["foo"]();
});
import { firu } from "firu/dom";
firu.render(<Bar></Bar>);