unistore sucks i think
This commit is contained in:
1 parent
baeaead650
commit
02aadcf2db
21 files changed
+4468
-1354
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { h } from 'preact';
|
||||
import { Route, Router } from 'preact-router';
|
||||
import { Provider } from 'unistore/preact'
|
||||
|
||||
import mcratesStore from './store';
|
||||
import actions from './actions';
|
||||
|
||||
import Header from './components/header';
|
||||
|
||||
import Home from './routes/home';
|
||||
import Profile from './routes/profile';
|
||||
|
||||
const store = mcratesStore();
|
||||
|
||||
console.log(Home);
|
||||
|
||||
const App = () => (
|
||||
<Provider store={store}>
|
||||
<div id="app">
|
||||
<Header />
|
||||
<Router>
|
||||
<Route path="/" component={Home} />
|
||||
<Route path="/profile/" component={Profile} user="me" />
|
||||
<Route path="/profile/:user" component={Profile} />
|
||||
</Router>
|
||||
</div>
|
||||
</Provider>
|
||||
);
|
||||
|
||||
export default App;
|
||||
Reference in new issue
Block a user