JSX
compilerOptions
are already included if you usedxk
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.
export const GET = () => { return ( <h1>Welcome to xink!</h1> )}