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

Add suppressHydrationWarning to ReactDOM.domProps #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jderochervlk
Copy link
Contributor

Not sure if this a a good approach, but here's my thoughts:

If we want to make JSX not directly connected to React, we should move React specific JSX props out of the compiler and into React. With the type spreading this is easy to do. There are probably others we could move over here to keep JSX props cleaner, but this seems like a good start.

Fixes #102

Copy link
Contributor

@tsnobip tsnobip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this approach looks coherent to me too, but I know some people were complaining that type spreading on large types could have a perf impact on the compiler, is it still the case?

@jderochervlk
Copy link
Contributor Author

I just ran a cycle of clean and build a few times to see if there is a difference, and it takes about the same time either way, around 250-280ms.

@jderochervlk jderochervlk force-pushed the suppress-hydration-warning branch from 4e37e83 to 4b2fe12 Compare May 17, 2024 16:52
@jderochervlk
Copy link
Contributor Author

It's been a while, but do we want to merge this in?

@cknitt
Copy link
Member

cknitt commented Dec 7, 2024

Just tested this in a project of ours and it worked fine.
@mununki Any concerns from your part?

There are more React-specific props though: https://react.dev/reference/react-dom/components/common#common-props.

Shouldn't we investigate moving more of them from the JsxDOM.domProps definition in the compiler to the React bindings? E.g., suppressContentEditableWarning?

@joshderochervlk-simplisafe

Just tested this in a project of ours and it worked fine. @mununki Any concerns from your part?

There are more React-specific props though: react.dev/reference/react-dom/components/common#common-props.

Shouldn't we investigate moving more of them from the JsxDOM.domProps definition in the compiler to the React bindings? E.g., suppressContentEditableWarning?

I think doing a larger pass on this would be a good way to go, yeah.

@mununki
Copy link
Member

mununki commented Dec 10, 2024

Just tested this in a project of ours and it worked fine. @mununki Any concerns from your part?

There are more React-specific props though: react.dev/reference/react-dom/components/common#common-props.

Shouldn't we investigate moving more of them from the JsxDOM.domProps definition in the compiler to the React bindings? E.g., suppressContentEditableWarning?

I have no particular concerns about this.

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

Successfully merging this pull request may close these issues.

suppressHydrationWarning does not belong to type JsxDOM.domProps
5 participants