Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mattstypa/sillyapp

Silly React Store and Router
https://github.com/mattstypa/sillyapp

Last synced: about 1 month ago
JSON representation

Silly React Store and Router

Awesome Lists containing this project

README

        

# SillyApp

This is combines [SillyStore](https://github.com/MattStypa/sillystore) and [SillyRouter](https://github.com/MattStypa/sillyrouter) into one.

```js
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(
,
document.getElementById('root')
);
```