-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Closed
Labels
package: react@ionic/react package@ionic/react packagetype: buga confirmed bug reporta confirmed bug report
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
I've been playing with React 19. I've noticed that Ionic has issues with some of the React 19 types. (This PR is proposed by core React team.)
DefinitelyTyped/DefinitelyTyped#69022
Some components do work, like IonButton
. But lots don't, like IonBackButton
and IonApp
:
'IonBackButton' cannot be used as a JSX component.
Its type '{ new (props: Props | Readonly<Props>): { context: NavContextState; clickButton: (e: MouseEvent<Element, MouseEvent>) => void; ... 17 more ...; UNSAFE_componentWillUpdate?(nextProps: Readonly<...>, nextState: Readonly<...>, nextContext: any): void; }; new (props: Props, context: any): { ...; }; readonly displayName:...' is not a valid JSX element type.
Expected Behavior
All components work with React 19.
Given that React 19 will be released imminently, I think it would be smart to get ahead of this :)
Steps to Reproduce
- Open https://stackblitz.com/edit/i9zdvi-adpda9
- Observe type issues with
Code Reproduction URL
https://stackblitz.com/edit/i9zdvi-adpda9
Ionic Info
Running stackblitz
Additional Information
Good news: Ionic works great with 19 so far in my testing, just issues with types :)
ptmkenny, hugocxl, jb-thery, ErVincit, asgeo1 and 13 more
Metadata
Metadata
Assignees
Labels
package: react@ionic/react package@ionic/react packagetype: buga confirmed bug reporta confirmed bug report