Declare relative-element under React.JSX to fix React 19 compatibility#305
Declare relative-element under React.JSX to fix React 19 compatibility#305francinelucca merged 6 commits intogithub:mainfrom
relative-element under React.JSX to fix React 19 compatibility#305Conversation
Fixes github#304 I had to add a `@ts-expect-error` comment since otherwise the typechecker would complain about missing `react` as a dependency.
|
@github/primer you'll need to integrate this to check whether or not this is viable for the monolith. Please do not merge before checking this, otherwise we'll have to revert. |
|
@eramdam looks like this isn't quite passing the CI checks. Does |
Oops, you're right, it doesn't 🙈 I wanted to avoid it but it looks like the only clean way of fixing the issue was to add |
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
|
Hey @eramdam, thanks for looking into this. I'm hesitant to merge React-specific code into this project, considering it really has nothing to do with React. Could we instead put the React code into a separate .d.ts file and ask that clients add it to their tsconfig.json? |
keithamus
left a comment
There was a problem hiding this comment.
I think this looks okay from a library perspective. I dislike that there’s react specific idioms too, but react is always messy to integrate with so… 🤷♂️
@camertron lets try integrating this with PVC and see if there are any issues. AIUI this shouldn’t cause too much friction within PVC, but it might and at that point we’ll need to look at other solutions. My hope is this is a transparent change to non-react projects like PVC, and doesn’t pull in additional dependencies.
|
It’d be really helpful to merge this pull request to fix compatibility with React 19. |
@hectahertz as our PVC release conductor this week, could you take a look at integrating this change with PVC and see if there are any issues? |
|
FYI, I asked @jonrohan about this last week: J: for the releative-time-element, I think we just need to test upgrading in PVC and see if it still runs properly on the lookbook So the work here is:
|
Fixes #304
I had to add a
@ts-expect-errorcomment since otherwise the typechecker would complain about missingreactas a dependency.