to use with esbuild cli:
--jsx=automatic --jsx-import-source=@jsx6 --jsx-dev
or esbuild JS API:
{
jsx: "automatic",
jsxImportSource: "@jsx6",
jsxDev: true,
}
Create a development element (TypeScript type).
Parameters:
-
type
(unknown
) — element type:Fragment
symbol, tag name (string
), component -
props
([Props
][api-props]) — element props,children
, and maybenode
-
key
(string
orundefined
) — dynamicly generated key to use -
isStaticChildren
(boolean
) — whether two or more children are passed (in an array), which is whetherjsxs
orjsx
would be used in production runtime -
source
([Source
][api-source]) — info about source -
self
(undefined
) — this is used by frameworks that have components
sample source entry:
{
fileName: "src/someFile.jsx",
lineNumber: 4,
columnNumber: 5
}