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 11import type { FunctionComponent } from "preact" ;
2- import type { RoutableProps } from "preact-iso" ;
32import { useEffect , useState } from "preact/hooks" ;
43import { MyOtherComponent } from "../MyOtherComponent/index.tsx" ;
54
65console . log ( "MyComponent is being synchronously imported..." ) ;
76
8- type MyProps = RoutableProps & {
7+ type MyProps = {
98 foo : string ;
109} ;
1110
Original file line number Diff line number Diff line change @@ -17,11 +17,8 @@ const GLOBAL_COMPONENTS_DIR: string = Deno.cwd() + "/src/components";
1717@Controller ( )
1818class MyController {
1919 @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" } ) ;
2522 }
2623
2724 @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";
88class FooController {
99 @Get ( "/" )
1010 serve ( ) {
11- return ssr ( MyComponent , { path : "/" , foo : "bar" } ) ;
11+ return ssr ( MyComponent , { foo : "bar" } ) ;
1212 }
1313}
1414
You can’t perform that action at this time.
0 commit comments