Skip to content

JSX

If you’re using Deno, add this to your deno.json file:

"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "@xinkjs/xin"
}

Otherwise, add to your tsconfig.json file:

"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "@xinkjs/xin"
}

Be sure to use a .jsx or .tsx file extension with your route filename.

route.tsx
api.get(() =>
return (
<h1>Welcome to xin!</h1>
)
)