-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Proposal: [breaking-change] Default to h
and Fragment
for JSX
#11186
Comments
Ideally we could have a deno_lint rule that would appropriate warn people of this upcoming change. Unfortunately it seems like deno_lint does not take into account tsconfig yet. |
It's a low hanging fruit to pass tsconfig options to |
Opened an issue in |
One suggestion on this has been to "turn off" JSX by default and to encourage people to use the pragmas of
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
@bartlomieju I think this can be closed. Pretty much everyone switched to the newer automatic runtime transform where you specify a single |
@marvinhagemeister we discussed this yesterday and David wants to change it. |
Oh in that case I don't mind. Happy it assist in any way possible 👍 |
Discussed with Luca and David and we feel it's not worth the effort to switch these as the most used way to configure JSX is Closing without further action. |
Currently, Deno CLI defaults to effectively the following compiler options for TypeScript:
I believe it is far more common though in Deno to not use React specifically for server-side rendering, the most common use case for JSX/TSX in Deno. Instead I think modular libraries where you import
h
andFragment
are far more common (Like Preact or Nano-JSX).I propose we default to the following settings:
Currently, anyone using one of these "importable" libraries has to either use the
--config
option on the command line, or use the TypeScript JSX pragma in each file:Considerations
h
andFragment
and is only overridable via the pragmas.--jsx-react
or just people to use--config
or the pragma? I am for documenting it and encouraging people to use--config
or the pragma if they want the old behaviour.The text was updated successfully, but these errors were encountered: