react-infinite-scroll-component icon indicating copy to clipboard operation
react-infinite-scroll-component copied to clipboard

Typescript Error JSX element class does not support attributes because it does not have a 'props' property. ts(2607)

Open ZengLawrence opened this issue 4 years ago • 5 comments

Getting typescript error from vscode: "JSX element class does not support attributes because it does not have a 'props' property. ts(2607)". See screen shot.

Screen Shot 2021-02-07 at 5 24 01 PM

react: 17.0 typescript: 4.1.2

Try example from the stories folder WindowInfiniteScrollComponent.tsx. Got the same error in my workspace.

ZengLawrence avatar Feb 07 '21 22:02 ZengLawrence

i had the same problem, i had to change to js file again until there's a solution

jmom14 avatar Mar 05 '21 18:03 jmom14

Is there any fix for this without switching to js file ?

mouhsinelonly avatar Oct 05 '21 19:10 mouhsinelonly

Any resolution for this bug ?

msft-guy avatar Nov 09 '21 19:11 msft-guy

Hi guys ! Any solution found on this issue ? Kind of annoying to not be able to use .tsx files

BrianRid avatar Aug 24 '22 13:08 BrianRid

I solved it by running pnpm config set auto-install-peers true && pnpm install --fix-lockfile. Not sure if this might help anyone.

geoyws avatar Jan 26 '23 08:01 geoyws