@@ -7,13 +7,13 @@ Simple jsx libs.
77#### Deno
88
99``` ts
10- import {...}
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
10+ import {...}
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
1111```
1212
1313#### Deno npm
1414
1515``` ts
16- import {...}
from " npm:[email protected] .23 /jsx" ;
16+ import {...}
from " npm:[email protected] .24 /jsx" ;
1717```
1818
1919#### Node / Bun
@@ -30,13 +30,13 @@ import {...} from "nhttp-land/jsx";
3030/** @jsx n */
3131/** @jsxFrag n.Fragment */
3232
33- import nhttp from " https://deno.land/x/[email protected] .23 /mod.ts" ;
33+ import nhttp from " https://deno.land/x/[email protected] .24 /mod.ts" ;
3434import {
3535 type FC ,
3636 Helmet ,
3737 n ,
3838 renderToHtml ,
39- }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
39+ }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
4040
4141// support for AsyncComponent
4242const Fetcher: FC = async () => {
@@ -86,7 +86,7 @@ app.listen(8000, () => {
8686 "jsxImportSource" : " nhttp-jsx"
8787 },
8888 "imports" : {
89- "nhttp-jsx/jsx-runtime" :
" https://deno.land/x/[email protected] .23 /lib/jsx/jsx-runtime.ts" 89+ "nhttp-jsx/jsx-runtime" :
" https://deno.land/x/[email protected] .24 /lib/jsx/jsx-runtime.ts" 9090 }
9191}
9292```
@@ -104,7 +104,7 @@ app.listen(8000, () => {
104104 "jsxImportSource" : " nhttp-jsx"
105105 },
106106 "imports" : {
107- "nhttp-jsx/jsx-runtime" :
" https://deno.land/x/[email protected] .23 /lib/jsx/jsx-runtime.ts" 107+ "nhttp-jsx/jsx-runtime" :
" https://deno.land/x/[email protected] .24 /lib/jsx/jsx-runtime.ts" 108108 }
109109}
110110```
@@ -116,7 +116,7 @@ app.listen(8000, () => {
116116use requestEvent.
117117
118118``` tsx
119- import {
useRequestEvent }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
119+ import {
useRequestEvent }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
120120
121121const Home: FC = () => {
122122 const rev = useRequestEvent ();
@@ -130,7 +130,7 @@ const Home: FC = () => {
130130use parameter from router. e.g. ` /user/:name ` .
131131
132132``` tsx
133- import {
useParams }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
133+ import {
useParams }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
134134
135135const User: FC = () => {
136136 const params = useParams <{ name: string }>();
@@ -144,7 +144,7 @@ const User: FC = () => {
144144use query parameter from url. e.g. ` /user?name=john ` .
145145
146146``` tsx
147- import {
useQuery }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
147+ import {
useQuery }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
148148
149149const User: FC = () => {
150150 const query = useQuery <{ name: string }>();
@@ -158,7 +158,7 @@ const User: FC = () => {
158158use request body.
159159
160160``` tsx
161- import {
useBody }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
161+ import {
useBody }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
162162
163163const User: FC = async () => {
164164 const user = useBody <{ name: string }>();
@@ -175,7 +175,7 @@ const User: FC = async () => {
175175use http_response.
176176
177177``` tsx
178- import {
useResponse }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
178+ import {
useResponse }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
179179
180180const User: FC = () => {
181181 const res = useResponse ();
@@ -191,7 +191,7 @@ const User: FC = () => {
191191minimal for simple client interactive.
192192
193193``` tsx
194- import {
useScript }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
194+ import {
useScript }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
195195
196196const Counter: FC = () => {
197197 const state = { count: 0 };
@@ -226,7 +226,7 @@ const Counter: FC = () => {
226226generate unique id.
227227
228228``` tsx
229- import {
useId }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
229+ import {
useId }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
230230
231231const User: FC = () => {
232232 const title_id = useId ();
@@ -246,7 +246,7 @@ const User: FC = () => {
246246add style directly to the markup.
247247
248248``` tsx
249- import {
useStyle }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
249+ import {
useStyle }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
250250
251251const User: FC = () => {
252252 useStyle ({
@@ -275,7 +275,7 @@ Add context provider.
275275import {
276276 createContext ,
277277 useContext ,
278- }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
278+ }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
279279
280280const FooContext = createContext ();
281281
@@ -297,8 +297,8 @@ app.get("/foo", () => {
297297``` tsx
298298/** @jsx n */
299299/** @jsxFrag n.Fragment */
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" ;
300+ import nhttp from " https://deno.land/x/[email protected] .24 /mod.ts" ;
301+ import {
n ,
htmx ,
renderToHtml }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
302302
303303const app = nhttp ();
304304
@@ -330,9 +330,9 @@ import {
330330 FC ,
331331 n ,
332332 renderToHtml ,
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" ;
333+ }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
334+ import {
useTwindServer }
from " https://deno.land/x/[email protected] .24 /lib/jsx/twind-server.ts" ;
335+ import nhttp from " https://deno.land/x/[email protected] .24 /mod.ts" ;
336336
337337useTwindServer ();
338338
@@ -355,9 +355,9 @@ import {
355355 Helmet ,
356356 options ,
357357 renderToHtml ,
358- }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
358+ }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
359359import { renderToString } from " https://esm.sh/react-dom/server" ;
360- import nhttp from " https://deno.land/x/[email protected] .23 /mod.ts" ;
360+ import nhttp from " https://deno.land/x/[email protected] .24 /mod.ts" ;
361361
362362options .onRenderElement = (elem ) => {
363363 return renderToString (elem);
@@ -394,9 +394,9 @@ import {
394394 Helmet ,
395395 options ,
396396 renderToHtml ,
397- }
from " https://deno.land/x/[email protected] .23 /lib/jsx.ts" ;
397+ }
from " https://deno.land/x/[email protected] .24 /lib/jsx.ts" ;
398398import { renderToString } from " https://esm.sh/preact-render-to-string" ;
399- import nhttp from " https://deno.land/x/[email protected] .23 /mod.ts" ;
399+ import nhttp from " https://deno.land/x/[email protected] .24 /mod.ts" ;
400400
401401options .onRenderElement = (elem ) => {
402402 return renderToString (elem);
0 commit comments