Skip to content
Myr

jsx-dev-runtime.ts

This file

Path

src/jsx/jsx-dev-runtime.ts

21 lines · 606 bytes · TypeScript

Last changed by

Merge pull request #2167 from honojs/v4Yusuke Wadabefore adoption2c44ad7

History of this file

Take it

The walk stopped after 200 commits: lines older than 2f9a07d point at it.

perf(hono-base): use `instanceOf` (#1565)Yusuke Wadabefore adoption2f9a07d

line 1why, one step back
1import type { HtmlEscapedString } from '../utils/html'

Merge pull request #2167 from honojs/v4Yusuke Wadabefore adoption2c44ad7

lines 2–4why, one step back
2import { jsxFn } from './base'
3import type { JSXNode } from './base'4export { Fragment } from './base'

perf(hono-base): use `instanceOf` (#1565)Yusuke Wadabefore adoption2f9a07d

line 5why, one step back
5

Merge pull request #2167 from honojs/v4Yusuke Wadabefore adoption2c44ad7

lines 6–11why, one step back
6export function jsxDEV(
7 tag: string | Function,8 props: Record<string, unknown>,9 key?: string10): JSXNode {11 let node: JSXNode

fix(jsx): fix jsx-runtime for falsy children (#1910)Taku Amanobefore adoption2d8d59f

line 12why, one step back
12 if (!props || !('children' in props)) {

Merge pull request #2167 from honojs/v4Yusuke Wadabefore adoption2c44ad7

lines 13–17why, one step back
13 node = jsxFn(tag, props, [])
14 } else {15 const children = props.children as string | HtmlEscapedString16 delete props['children']17 node = Array.isArray(children) ? jsxFn(tag, props, children) : jsxFn(tag, props, [children])

Merge pull request #1690 from honojs/nextYusuke Wadabefore adoption5e3e85a

line 18why, one step back
18 }

Merge pull request #2167 from honojs/v4Yusuke Wadabefore adoption2c44ad7

lines 19–20why, one step back
19 node.key = key
20 return node

perf(hono-base): use `instanceOf` (#1565)Yusuke Wadabefore adoption2f9a07d

line 21why, one step back
21}