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

'SwipeableViews' cannot be used as a JSX component. #678

Open
vuongnh1705 opened this issue Mar 24, 2023 · 1 comment
Open

'SwipeableViews' cannot be used as a JSX component. #678

vuongnh1705 opened this issue Mar 24, 2023 · 1 comment

Comments

@vuongnh1705
Copy link

'SwipeableViews' cannot be used as a JSX component.
Its instance type 'SwipeableViews' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Type 'import("d:/vuongnh/Web/Avm.Vietbank/Avm.Vietbank/Avm.Vietbank.SunSpa/ClientApp/node_modules/@testing-library/react/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.
Type '{}' is not assignable to type 'ReactNode'.

@chunlaw
Copy link

chunlaw commented Mar 6, 2024

In your tsconfig.json, try adding

{
  "compilerOptions": {
    "paths": {
      "react": ["./node_modules/@types/react"]
    },
    ...
  },
  ...
}

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

No branches or pull requests

2 participants