fix(types): import JSX to support React 19 / fix animated.div type er…#5
fix(types): import JSX to support React 19 / fix animated.div type er…#5liambickett wants to merge 1 commit intoCapventis:1-feat-react-19from
Conversation
…ror (pmndrs#2358) React 19 moved the JSX namespace from global scope to the React module. This updates type definitions to explicitly import the `JSX` type from 'react', resolving issues issues for consumers using React 19+. Note: Backwards-compatible with React 18.
|
@kierancap Ngl, I haven't been a contributor before. Just found and fixed this locally, so thought I would try to help. If there is anything I can do to make your life or merging this easier please lmk! |
Hey! I very much appreciate the work! I would probably say in terms of tidiness, that my PR should be closed properly before we add any more bits to it. I'll hopefully have time this week to look into working on my PR after Josh's comments. If you keep your branch alive, you should be able to directly make a PR to the upstream react-spring repo once my PR is merged! Again, thank you for the help, greatly appreciated :) I'll drop you a ping here once that PR is merged |
|
@kierancap Sounds like a plan! Thanks for what you're doing! |
Why
JSX moved from the global namespace to the React module. Use of global breaks internal type declarations.
Resolves #2358 and ensures compatibility with React 19.
What
Checklist