-
Notifications
You must be signed in to change notification settings - Fork 477
Split domProps into separate subtypes #8162
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
base: master
Are you sure you want to change the base?
Conversation
|
Btw: I tried to fix the failing check by using the analaysis tests, but it didn't change anything.
The test-analysis command succeeds, but doesn't change anything. So nothing to commit. |
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
Updated the container. Now it uses rust 1.92. |
|
I think idea-wise I like this. It does make me wonder how much of these types should still lives in this repo and not in rescript-react? Can't say anything on the impact of this change. I hope others can share more insights. |
|
According to the comments, there are just 4 react specific fields. They could be moved to the rescript-react repo and it should be easy to extend the original domProps there. All other fields are probably from the html5 spec. Theoretically, they would also fit into the experimental-rescript-webapi repo. So library authors (who needs custom jsx stuff) could also benefit from other apis like But I think it would overcomplicate the whole process to create custom jsx transformers. |
While building custom jsx transformers or defining bindings for "jsx-libraries" other than react, it could be possible, that some "fields" in domProps has other types as in the core library.
Examples:
So, if you want to add a field, fine. Just extend domProps.
But if you want to change an existing field, you have to create your own type and copy hundreds of existing fields. This is tedious.
I splitted the domProps into some subtypes, so it is easier to define your own domProps.
Example:
What do you think?
Is there an easier way?
Does it have performance implications?