Skip to content

JSX

compilerOptions are already included if you used xk to create your project.

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

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

Otherwise, add to your tsconfig.json file:

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

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

src/routes/route.tsx
export const GET = () => {
return (
<h1>Welcome to xink!</h1>
)
}