File tree 1 file changed +19
-19
lines changed
1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change 1
1
import { createSignal , lazy } from 'solid-js' ;
2
2
import { render } from 'solid-js/web' ;
3
- // import { Link } from 'solid-app-router';
4
- // import { MetaProvider } from 'solid-meta';
5
- // import { Router, Route, RouteDefinition } from 'solid-app-router';
3
+ import { Link } from 'solid-app-router' ;
4
+ import { MetaProvider } from 'solid-meta' ;
5
+ import { Router , Route , RouteDefinition } from 'solid-app-router' ;
6
6
7
7
import Home from './pages' ;
8
8
9
- // const routes: RouteDefinition[] = [
10
- // {
11
- // path: '/',
12
- // component: Home,
13
- // },
14
- // {
15
- // path: '/about',
16
- // component: lazy(() => import('./pages/about')),
17
- // },
18
- // ];
9
+ const routes : RouteDefinition [ ] = [
10
+ {
11
+ path : '/' ,
12
+ component : Home ,
13
+ } ,
14
+ {
15
+ path : '/about' ,
16
+ component : lazy ( ( ) => import ( './pages/about' ) ) ,
17
+ } ,
18
+ ] ;
19
19
20
20
const App = ( ) => {
21
21
const [ count , setCount ] = createSignal ( 0 ) ;
22
22
23
23
return (
24
24
< >
25
- { /* <Link href="/">Home</Link>
25
+ < Link href = "/" > Home</ Link >
26
26
< Link href = "/about" > About!!!</ Link >
27
- <Route /> */ }
27
+ < Route />
28
28
< button onClick = { ( ) => setCount ( count ( ) + 1 ) } > { count ( ) } </ button >
29
29
</ >
30
30
) ;
31
31
} ;
32
32
33
33
const dispose = render (
34
34
( ) => (
35
- // <Router routes={routes}>
36
- // <MetaProvider>
35
+ < Router routes = { routes } >
36
+ < MetaProvider >
37
37
< App />
38
- // </MetaProvider>
39
- // </Router>
38
+ </ MetaProvider >
39
+ </ Router >
40
40
) ,
41
41
document . getElementById ( 'app' ) ,
42
42
) ;
You can’t perform that action at this time.
0 commit comments