0.0.2 • Published 6 years ago

spaman v0.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

spaman

Single Page Application Manager

import * as _ from "lodash";
import * as React from "react";
import {SpaControllers} from "spaman";

import HomePage from "pages/HomePage";
import SamplePage1 from "pages/SamplePage1";
import SamplePage2 from "pages/SamplePage2";

const h = React.createElement

const Home = "Home"

export const Controllers =  {
  [Home]: SpaControllers.functional("Home", "", (qparams) => <HomePage/>),
  Sample1: SpaControllers.functional("Sample1", "sample1", (qparams) => <SamplePage1/>),
  Sample2: SpaControllers.functional("Sample2", "sample2", (qparams) => h(SamplePage2)),
}