Skip to content

Commit

Permalink
fix about JSX
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe committed Feb 17, 2023
1 parent 65dc833 commit 6f14108
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
15 changes: 0 additions & 15 deletions getting-started/bun.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,3 @@ bun wiptest index.test.ts
::: warning
"_wiptest_" command is a still WIP. "_test_" command that is not a WIP might be released.
:::

## JSX Middleware

JSX Middleware works on Bun. It does not depend `React`, so you can use JSX without installing React.
To use it, set up `tsconfig.json` like below:

```json
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxFragmentFactory": "Fragment",
"jsxImportSource": "hono/jsx"
}
}
```
27 changes: 0 additions & 27 deletions middleware/builtin/jsx.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import { jsx } from 'https://deno.land/x/hono/middleware.ts'

## Settings

### Cloudflare Workers

tsconfig.json:

```json
Expand All @@ -45,31 +43,6 @@ Or use pragma:
import { jsx } from 'hono/jsx'
```

### Deno

Pragma:

```ts
/** @jsx jsx */
/** @jsxFrag Fragment */
```

### Bun

tsconfig.json:

```json
{
"compilerOptions": {
"jsx": "preserve",
"jsxFragmentFactory": "Fragment",
"jsxImportSource": "hono/jsx"
}
}
```

You do not have to `import { jsx } from 'hono/jsx`.

## Usage

index.tsx:
Expand Down

0 comments on commit 6f14108

Please sign in to comment.