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

React 19 support #1431

Open
Malien opened this issue Jan 15, 2025 · 2 comments
Open

React 19 support #1431

Malien opened this issue Jan 15, 2025 · 2 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@Malien
Copy link

Malien commented Jan 15, 2025

Now that react 19 is out this is a burning issue!

React 19 removed global JSX namespace from it's typings. As a result any styled component is typed as any. #1420 addresses this issue.

As a side note, the repo feels dead rn. Nothing was done in 9 months. Has linaria ran out of steam? Should we move on to a better supported solution?

As a workaround:

declare global {
  namespace JSX {
    interface IntrinsicElements extends React.JSX.IntrinsicElements {}
  }
}
@Malien Malien added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Jan 15, 2025
@github-actions github-actions bot removed the needs: triage 🏷 Issue needs to be checked and prioritized label Jan 15, 2025
@Firsh
Copy link

Firsh commented Jan 21, 2025

Is this why I'm getting Property 'div' does not exist on type 'Styled'. everywhere? Thank you for the workaround!

@Malien
Copy link
Author

Malien commented Jan 21, 2025

Is this why I'm getting Property 'div' does not exist on type 'Styled'. everywhere? Thank you for the workaround!

Not sure. I was getting

typeof styled.div`` == any

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

2 participants