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

Open
3 tasks done
skorphil opened this issue Mar 10, 2025 · 4 comments
Open
3 tasks done

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

skorphil opened this issue Mar 10, 2025 · 4 comments
Labels

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants