@@ -7,13 +7,13 @@ Simple jsx libs.
7
7
#### Deno
8
8
9
9
``` ts
10
- import {...}
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
10
+ import {...}
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
11
11
```
12
12
13
13
#### Deno npm
14
14
15
15
``` ts
16
- import {...}
from " npm:[email protected] .22 /jsx" ;
16
+ import {...}
from " npm:[email protected] .23 /jsx" ;
17
17
```
18
18
19
19
#### Node / Bun
@@ -30,13 +30,13 @@ import {...} from "nhttp-land/jsx";
30
30
/** @jsx n */
31
31
/** @jsxFrag n.Fragment */
32
32
33
- import nhttp from " https://deno.land/x/[email protected] .22 /mod.ts" ;
33
+ import nhttp from " https://deno.land/x/[email protected] .23 /mod.ts" ;
34
34
import {
35
35
type FC ,
36
36
Helmet ,
37
37
n ,
38
38
renderToHtml ,
39
- }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
39
+ }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
40
40
41
41
// support for AsyncComponent
42
42
const Fetcher: FC = async () => {
@@ -86,7 +86,7 @@ app.listen(8000, () => {
86
86
"jsxImportSource" : " nhttp-jsx"
87
87
},
88
88
"imports" : {
89
- "nhttp-jsx/jsx-runtime" :
" https://deno.land/x/[email protected] .22 /lib/jsx/jsx-runtime.ts"
89
+ "nhttp-jsx/jsx-runtime" :
" https://deno.land/x/[email protected] .23 /lib/jsx/jsx-runtime.ts"
90
90
}
91
91
}
92
92
```
@@ -104,7 +104,7 @@ app.listen(8000, () => {
104
104
"jsxImportSource" : " nhttp-jsx"
105
105
},
106
106
"imports" : {
107
- "nhttp-jsx/jsx-runtime" :
" https://deno.land/x/[email protected] .22 /lib/jsx/jsx-runtime.ts"
107
+ "nhttp-jsx/jsx-runtime" :
" https://deno.land/x/[email protected] .23 /lib/jsx/jsx-runtime.ts"
108
108
}
109
109
}
110
110
```
@@ -116,7 +116,7 @@ app.listen(8000, () => {
116
116
use requestEvent.
117
117
118
118
``` tsx
119
- import {
useRequestEvent }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
119
+ import {
useRequestEvent }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
120
120
121
121
const Home: FC = () => {
122
122
const rev = useRequestEvent ();
@@ -130,7 +130,7 @@ const Home: FC = () => {
130
130
use parameter from router. e.g. ` /user/:name ` .
131
131
132
132
``` tsx
133
- import {
useParams }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
133
+ import {
useParams }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
134
134
135
135
const User: FC = () => {
136
136
const params = useParams <{ name: string }>();
@@ -144,7 +144,7 @@ const User: FC = () => {
144
144
use query parameter from url. e.g. ` /user?name=john ` .
145
145
146
146
``` tsx
147
- import {
useQuery }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
147
+ import {
useQuery }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
148
148
149
149
const User: FC = () => {
150
150
const query = useQuery <{ name: string }>();
@@ -158,7 +158,7 @@ const User: FC = () => {
158
158
use request body.
159
159
160
160
``` tsx
161
- import {
useBody }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
161
+ import {
useBody }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
162
162
163
163
const User: FC = async () => {
164
164
const user = useBody <{ name: string }>();
@@ -175,7 +175,7 @@ const User: FC = async () => {
175
175
use http_response.
176
176
177
177
``` tsx
178
- import {
useResponse }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
178
+ import {
useResponse }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
179
179
180
180
const User: FC = () => {
181
181
const res = useResponse ();
@@ -191,7 +191,7 @@ const User: FC = () => {
191
191
minimal for simple client interactive.
192
192
193
193
``` tsx
194
- import {
useScript }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
194
+ import {
useScript }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
195
195
196
196
const Counter: FC = () => {
197
197
const state = { count: 0 };
@@ -226,7 +226,7 @@ const Counter: FC = () => {
226
226
generate unique id.
227
227
228
228
``` tsx
229
- import {
useId }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
229
+ import {
useId }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
230
230
231
231
const User: FC = () => {
232
232
const title_id = useId ();
@@ -246,7 +246,7 @@ const User: FC = () => {
246
246
add style directly to the markup.
247
247
248
248
``` tsx
249
- import {
useStyle }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
249
+ import {
useStyle }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
250
250
251
251
const User: FC = () => {
252
252
useStyle ({
@@ -275,7 +275,7 @@ Add context provider.
275
275
import {
276
276
createContext ,
277
277
useContext ,
278
- }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
278
+ }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
279
279
280
280
const FooContext = createContext ();
281
281
@@ -297,8 +297,8 @@ app.get("/foo", () => {
297
297
``` tsx
298
298
/** @jsx n */
299
299
/** @jsxFrag n.Fragment */
300
- import nhttp from " https://deno.land/x/[email protected] .22 /mod.ts" ;
301
- import {
n ,
htmx ,
renderToHtml }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
300
+ import nhttp from " https://deno.land/x/[email protected] .23 /mod.ts" ;
301
+ import {
n ,
htmx ,
renderToHtml }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
302
302
303
303
const app = nhttp ();
304
304
@@ -330,9 +330,9 @@ import {
330
330
FC ,
331
331
n ,
332
332
renderToHtml ,
333
- }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
334
- import {
useTwindServer }
from " https://deno.land/x/[email protected] .22 /lib/jsx/twind-server.ts" ;
335
- import nhttp from " https://deno.land/x/[email protected] .22 /mod.ts" ;
333
+ }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
334
+ import {
useTwindServer }
from " https://deno.land/x/[email protected] .23 /lib/jsx/twind-server.ts" ;
335
+ import nhttp from " https://deno.land/x/[email protected] .23 /mod.ts" ;
336
336
337
337
useTwindServer ();
338
338
@@ -355,9 +355,9 @@ import {
355
355
Helmet ,
356
356
options ,
357
357
renderToHtml ,
358
- }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
358
+ }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
359
359
import { renderToString } from " https://esm.sh/react-dom/server" ;
360
- import nhttp from " https://deno.land/x/[email protected] .22 /mod.ts" ;
360
+ import nhttp from " https://deno.land/x/[email protected] .23 /mod.ts" ;
361
361
362
362
options .onRenderElement = (elem ) => {
363
363
return renderToString (elem);
@@ -394,9 +394,9 @@ import {
394
394
Helmet ,
395
395
options ,
396
396
renderToHtml ,
397
- }
from " https://deno.land/x/[email protected] .22 /lib/jsx.ts" ;
397
+ }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
398
398
import { renderToString } from " https://esm.sh/preact-render-to-string" ;
399
- import nhttp from " https://deno.land/x/[email protected] .22 /mod.ts" ;
399
+ import nhttp from " https://deno.land/x/[email protected] .23 /mod.ts" ;
400
400
401
401
options .onRenderElement = (elem ) => {
402
402
return renderToString (elem);
0 commit comments