1.0.1 • Published 6 years ago

sillyapp v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

SillyApp

This is combines SillyStore and SillyRouter into one.

import App from 'sillyapp';

const store = {
  count: 0,
};

import Home from './components/Home.js';
import AboutUser from './components/AboutUser.js';
import NotFound from './component/NotFound.js';

const routes = [
  {name: 'home', path: '/', component: Home},
  {name: 'aboutUser', path: '/user/:userId', component AboutUser},
  {name: 404, component: NotFound},
];

ReactDOM.render(
  <App store={store} routes={routes}/>,
  document.getElementById('root')
);