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

bug: ts error: 'IonApp' cannot be used as a JSX component. #30237

Closed
3 tasks done
skorphil opened this issue Mar 10, 2025 · 6 comments
Closed
3 tasks done

bug: ts error: 'IonApp' cannot be used as a JSX component. #30237

skorphil opened this issue Mar 10, 2025 · 6 comments
Labels
needs: reply the issue needs a response from the user

Comments

@skorphil
Copy link

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

import { IonApp, setupIonicReact } from "@ionic/react";
setupIonicReact();

function App() {
  return (
    <IonApp> // ts error: 'IonApp' cannot be used as a JSX component.

Expected Behavior

Ts not throwing error

Steps to Reproduce

insert <IonApp> component into your react app

Code Reproduction URL

i cant

Ionic Info

Do not have framework. Im using react components only

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Mar 10, 2025
@skorphil
Copy link
Author

That's because of react 19. Not throwing errors on react 18

@iberis2
Copy link

iberis2 commented Mar 12, 2025

That's because of react 19. Not throwing errors on react 18

I downgrade react and react-dom version to "^18.2.0" but still get the same errors

@skorphil
Copy link
Author

That's because of react 19. Not throwing errors on react 18

I downgrade react and react-dom version to "^18.2.0" but still get the same errors

@iberis2 Have you downgraded react types?

@iberis2
Copy link

iberis2 commented Mar 12, 2025

That's because of react 19. Not throwing errors on react 18

I downgrade react and react-dom version to "^18.2.0" but still get the same errors

@iberis2 Have you downgraded react types?

yes I also downgrade types.
but it was the pnpm cache file issues, i fix it by removing the cache using pnpm store prune pnpm install --force.
thanks!

@brandyscarney
Copy link
Member

We've fixed some type errors with React 19 in 8.5.0. Could you try that version and let us know if you're still experiencing any issues? Thanks!

@brandyscarney brandyscarney added the needs: reply the issue needs a response from the user label Mar 13, 2025
@ionitron-bot ionitron-bot bot removed the triage label Mar 13, 2025
Copy link

ionitron-bot bot commented Mar 28, 2025

Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Thank you for using Ionic!

@ionitron-bot ionitron-bot bot closed this as completed Mar 28, 2025
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: reply the issue needs a response from the user
Projects
None yet
Development

No branches or pull requests

3 participants