react-swipeable-views icon indicating copy to clipboard operation
react-swipeable-views copied to clipboard

'SwipeableViews' cannot be used as a JSX component.

Open vuongnh1705 opened this issue 2 years ago • 1 comments

'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'.

vuongnh1705 avatar Mar 24 '23 07:03 vuongnh1705

In your tsconfig.json, try adding

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

chunlaw avatar Mar 06 '24 10:03 chunlaw