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: ReactSVG has been removed from @types/react #2667

Open
5 of 30 tasks
aslilac opened this issue Dec 6, 2024 · 1 comment · May be fixed by #2668
Open
5 of 30 tasks

react 19: ReactSVG has been removed from @types/react #2667

aslilac opened this issue Dec 6, 2024 · 1 comment · May be fixed by #2668
Labels
🐛 bug Something isn't working

Comments

@aslilac
Copy link

aslilac commented Dec 6, 2024

Package

  • lucide
  • lucide-angular
  • lucide-flutter
  • lucide-preact
  • lucide-react
  • lucide-react-native
  • lucide-solid
  • lucide-svelte
  • lucide-vue
  • lucide-vue-next
  • Figma plugin
  • source/main
  • other/not relevant

Version

0.468.0

Can you reproduce this in the latest version?

  • Yes
  • No

Browser

  • Chrome/Chromium
  • Firefox
  • Safari
  • Edge
  • iOS Safari
  • Opera
  • Other/not relevant

Operating system

  • Windows
  • Linux
  • macOS
  • ChromeOS
  • iOS
  • Android
  • Other/not relevant

Description

The type ReactSVG has been removed in React 19.

Module '"react"' has no exported member 'ReactSVG'.

Steps to reproduce

When using lucide-react with react, react-dom, @types/react, and @types/react-dom at 19 (which just stabilized today), it results in this type error coming from node_modules/lucide/dist/lucide-react.d.ts.

Checklist

  • I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
@aslilac aslilac added the 🐛 bug Something isn't working label Dec 6, 2024
@aslilac
Copy link
Author

aslilac commented Dec 6, 2024

from the PR (DefinitelyTyped/DefinitelyTyped#69022) that removed this type:

Replacement
Either ReactSVG from react-dom-factories or, if you used keyof ReactSVG, use SVGElementType instead

It seems lucide-react is in that second camp, and should use the SVGElementType

@aslilac aslilac linked a pull request Dec 6, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant