Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is "react" required? #83

Open
tebuevd opened this issue Feb 17, 2024 · 1 comment
Open

Why is "react" required? #83

tebuevd opened this issue Feb 17, 2024 · 1 comment

Comments

@tebuevd
Copy link

tebuevd commented Feb 17, 2024

I haven't been able to get Elysia with JSX to work unless I also add react to the project. This seems undocumented. Is this expected behavior?

@RoyalFoxy
Copy link

@tebuevd You have to add these three lines to your tsconfig.json

{
  "compilerOptions": {
    "jsx": "react",
    "jsxFactory": "Html.createElement",
    "jsxFragmentFactory": "Html.Fragment",
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants