Skip to content

Instantly share code, notes, and snippets.

@mnquintana
Created January 29, 2018 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnquintana/2c877f2cf0a1c74faaa164ee493616de to your computer and use it in GitHub Desktop.
Save mnquintana/2c877f2cf0a1c74faaa164ee493616de to your computer and use it in GitHub Desktop.
Path 3: Local Resources
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Desktop App</title>
<link rel="stylesheet" href="path/to/your/stylesheet.css">
</head>
<body>
<script src="renderer.js"></script>
</body>
</html>
const mainWindow = new BrowserWindow({
width: 800,
height: 800
});
mainWindow.loadURL('file://path/to/app-shell.html');
const {remote} = require('electron');
const {Component} = require('react');
const {Header, Sidebar} = require('@remote-web-app/ui');
const desktopInterop = {
setBadgeCount(count) {
return remote.app.setBadgeCount(count);
}
};
class DesktopApp extends Component {
render() {
return (
<div>
<Header desktopInterop={desktopInterop} />
<Sidebar desktopInterop={desktopInterop} />
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment