diff --git a/runtime/reference/jsx.md b/runtime/reference/jsx.md index 1aa2f07df..ec6a12844 100644 --- a/runtime/reference/jsx.md +++ b/runtime/reference/jsx.md @@ -29,6 +29,17 @@ options by default: } ``` +:::note + +When using the default `"react"` mode with React, you'll need to add +`@types/react` for type checking to work (e.g., +`"@types/react": "npm:@types/react"` in your `deno.json` imports). Without it +you'll get errors like `JSX element implicitly has type 'any'`. Consider using +the [automatic runtime](#jsx-automatic-runtime-recommended) instead, which is +the recommended approach. + +::: + Using the `"react"` option will convert JSX into the following JavaScript code: ```jsx