
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@kubb/renderer-jsx
Advanced tools
JSX-based renderer for Kubb. Provides a custom React runtime, reconciler, and built-in components (File, Function, Type, Const) for component-based, type-safe code generation.
Provides a custom React runtime, reconciler, and built-in components (File, Function, Type, Const) for component-based, type-safe code generation inside Kubb plugins.
bun add @kubb/renderer-jsx
# or
pnpm add @kubb/renderer-jsx
# or
npm install @kubb/renderer-jsx
Use the built-in components inside a Kubb plugin to emit generated files:
import { createRenderer } from '@kubb/renderer-jsx'
import { File, Function, Type } from '@kubb/renderer-jsx'
const renderer = createRenderer()
await renderer.render(
<File baseName="petStore.ts" path="src/gen/petStore.ts">
<File.Source>
<Type name="Pet">{'{ id: number; name: string }'}</Type>
<Function name="getPet" async>
{"return fetch('/pets')"}
</Function>
</File.Source>
</File>,
)
const files = renderer.files
renderer.unmount()
| Component | Description |
|---|---|
<File> | Declares a generated output file with its path and optional imports/exports |
<File.Source> | The source content block inside a <File> |
<Function> | Generates a TypeScript function declaration |
<Type> | Generates a TypeScript type alias |
<Const> | Generates a const variable declaration |
<Jsx> | Renders JSX expressions inside generated output |
<Root> | Root container for the renderer tree |
createRenderer(options?)Creates a new renderer instance.
const renderer = createRenderer({ debug: false })
await renderer.render(<MyComponent />)
const files = renderer.files // FileNode[]
renderer.unmount()
jsxRendererPre-built renderer instance for use directly in Kubb plugins as the jsxRenderer plugin option.
@kubb/renderer-jsx ships its own JSX runtime (jsx-runtime and jsx-dev-runtime). Configure your tsconfig.json to use it:
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "@kubb/renderer-jsx"
}
}
Kubb is an open source project, and its development is funded entirely by sponsors. If you would like to become a sponsor, please consider:
FAQs
JSX-based renderer for Kubb. Provides a custom React runtime, reconciler, and built-in components (File, Function, Type, Const) for component-based, type-safe code generation.
The npm package @kubb/renderer-jsx receives a total of 6,541 weekly downloads. As such, @kubb/renderer-jsx popularity was classified as popular.
We found that @kubb/renderer-jsx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.