Skip to content

Instantly share code, notes, and snippets.


FlorianRappl/piral-shell.tsx Secret

Created Nov 18, 2019
What would you like to do?
import * as React from "react";
import { render } from "react-dom";
import { createInstance, Piral, Dashboard } from "piral";
import { Layout, Loader } from "./layout";
const instance = createInstance({
requestPilets() {
return fetch("")
.then(res => res.json())
.then(res => res.items);
const app = (
<Piral instance={instance}>
<SetComponent name="LoadingIndicator" component={Loader} />
<SetComponent name="Layout" component={Layout} />
<SetRoute path="/" component={Dashboard} />
render(app, document.querySelector("#app"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.