-
Notifications
You must be signed in to change notification settings - Fork 463
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
JSX: error with fragment after fixing children type #6234
Comments
I'll look into it later tonight! Thanks! |
Have a quick look, and found there is a different transformation process for |
a bit weirder. module A = {
@react.component
let make = () => {
<>
<div />
</>
}
}
|
That's in JSX 4 classic mode, right? I was using automatic mode. |
Yes. JSX 4 classic and automatic has different build error each. I'll write down the summary. |
Here are the summarized issues regarding the shorthand syntax
<> <div /> <div /> </>
<> <div /> </>
<> <div /> <div /> </>
|
I don't feel the need to change the type definition of the fragment for JSX3 or modify the ppx yet, as long as working fine. |
rescript-lang/rescript-react#94 fixes the children type for
<>
,React.Fragment
,React.StrictMode
andReact.Suspense
by making itReact.element
instead of'children
.This causes an issue with
<>
:now gives the following error without location:
The components
React.Fragment
,React.StrictMode
andReact.Suspense
still work fine though, so it seems there is some special handling for<>
in the PPX that needs to be adapted.The text was updated successfully, but these errors were encountered: