-
Notifications
You must be signed in to change notification settings - Fork 465
JSX V4: investigate leftovers after release. #5505
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
Comments
@mattdamon108 this topic has grown to be quite substantial. Adding a top-level issue to track the various activities taking place, to coordinate, and so that interested people can follow along. |
@mattdamon108 I'm questioning the defaults. How about making v4 react classic the default? |
Is it what you want at the beginning? (backward compatibility) 😄 Switching the V4 as default is an effortless task like a finger snap. |
I think the vast majority of users will never need to change config. And beginners have 1 less thing to learn. |
Also, there's no setting for "do nothing". So this is a weird initialization. |
I think there is a setting for "do nothing", not adding |
How about throwing more informative error message, in case user didn't add the jsx configuration, but has written JSX expressions or attribute |
Before further discussion, let me clear your intention.
Is it correct? |
More messages is OK. Except if it's an error it's a breaking change. |
You can't do that per-file. |
I got your point. Let me write down some user stories to make it clear. First,
|
Yes, I think making V4 + classic as default brings the new feature with impact. |
Oh, we can still make not triggering the jsx ppx if user doesn't have any configuration about jsx at all. |
If we make V4 + classic as default, then submodules in dependencies will be affected by the same default, right? Is it your intention? |
It is very clever idea! If we update some react component such as Context, Fragment with Anyway, some components in this file https://github.com/rescript-lang/rescript-react/pull/49/files#diff-dc0e4227d38d3757b4c1cc61762295e29c7cb769e3644637d7769ea744c9f4d3 , needs to be updated though. Plus, I'd like to change this PR, and change my initial suggestion. It is better to update |
@mattdamon108 now that 10.0 is out, time to think about 10.1 and JSX v4. What is the current state? Are there parts still in progress or is it already time for detailed documentation? |
Beside the decision about V4 as default, there is no stuffs left in progress. |
There's a spec which is mostly for implementers, but occasionally could be used by users. |
One thing that came to my mind is to check if the user tries to use async with jsx definition as below. I'll make a PR if there is something to improve the error msg or etc. @react.component
let make = async () => body |
@cristianoc I found one thing left to be done. This PR needs to be done rescript-lang/rescript-react#49 which contains the new jsx transform api bindings. The ppx v4 is using it. |
That is with automatic mode right? The spec should be a bit more explicit about what automatic does, and what are the possible parameters for |
Yes, correct. |
One more thing, https://github.com/rescript-lang/rescript-react/blob/8f31f375bc8965dad4a1c498b6ab69227f150069/src/RescriptReact.res#L1
|
Can you explain more? There's a lot of content in that sentence. |
I can summarize this PR rescript-lang/rescript-react#49 into three things to achieve.
So, I like to mention that 1 and 2 in this PR are outstanding stuff for JSX V4. This is a little bit off-topic and seems proper to discuss in the PR thread. In my opinion, we can't make a single version supporting both V3 and V4 without having How about making a breaking version?
|
Why create a new version for JSX V3? I understand if some breaking changes might be unavoidable (or unclear how to achieve) in order to support V4. |
Oh, I meant v0.10.3 is the current version of rescript-react. There's no need to make a new version for V3. Sorry for making a confusion. |
@mattdamon108 so I think next steps are publishing a new beta version of rescript-react, finish up any testing and documentation, then invite people to test V4 in its various configurations. Correct? |
That would be very nice. |
If you agree to make the breaking version for JSX V4, then I'll fix the PR rescript-lang/rescript-react#49 accordingly. |
yes |
Got it. 🖖 I'll fix and clean up the PR right away. |
This is done, leaving leftovers for a future release.
This task is to track the various activities related to JSX V4.
bsconfig.json
Wire to JSX PPX V4 and introduce Jsx* modules #5484jsx
mode to rescript-react Update new jsx transform apis, bind to Jsx in compiler, for JSX V4. rescript-react#49The text was updated successfully, but these errors were encountered: