File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
1
import type { FunctionComponent } from "preact" ;
2
- import type { RoutableProps } from "preact-iso" ;
3
2
import { useEffect , useState } from "preact/hooks" ;
4
3
import { MyOtherComponent } from "../MyOtherComponent/index.tsx" ;
5
4
6
5
console . log ( "MyComponent is being synchronously imported..." ) ;
7
6
8
- type MyProps = RoutableProps & {
7
+ type MyProps = {
9
8
foo : string ;
10
9
} ;
11
10
Original file line number Diff line number Diff line change @@ -17,11 +17,8 @@ const GLOBAL_COMPONENTS_DIR: string = Deno.cwd() + "/src/components";
17
17
@Controller ( )
18
18
class MyController {
19
19
@Get ( "/" )
20
- simpleExample ( ctx : Context ) {
21
- return ssr ( MyComponent , {
22
- path : ctx . request . url . pathname ,
23
- foo : "bar" ,
24
- } ) ;
20
+ simpleExample ( ) {
21
+ return ssr ( MyComponent , { foo : "bar" } ) ;
25
22
}
26
23
27
24
@Get ( "/app/:page*" )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { MyComponent } from "../src/components/MyComponent/index.tsx";
8
8
class FooController {
9
9
@Get ( "/" )
10
10
serve ( ) {
11
- return ssr ( MyComponent , { path : "/" , foo : "bar" } ) ;
11
+ return ssr ( MyComponent , { foo : "bar" } ) ;
12
12
}
13
13
}
14
14
You can’t perform that action at this time.
0 commit comments