buttons / react-github-btn

:octocat: Unofficial github:button component for React.js
https://buttons.github.io
BSD 2-Clause "Simplified" License
62 stars 8 forks source link

JSX element class does not support attributes because it does not have a 'props' property. #9

Closed ghost closed 3 years ago

ghost commented 3 years ago

I am working with "react-github-btn" and getting this error in my webstorm linter but the code works successfully.

TS2607: JSX element class does not support attributes because it does not have a 'props' property.
TS2786: 'GitHubButton' cannot be used as a JSX component.
  Its instance type 'GitHubButton' is not a valid JSX element.
    Type 'GitHubButton' is missing the following properties from type 'ElementClass': render, context, setState, forceUpdate, and 3 more.
ntkme commented 3 years ago

I cannot reproduce your issue. I created a brand new project with npx create-react-app my-app --template typescript and added react-github-btn. No issue is reported by my tsserver linter.

Please try creating a new project with npx create-react-app my-app --template typescript and see if you can reproduce this issue with a brand new project with latest version of all dependencies.

ntkme commented 3 years ago

This is likely an issue of webstorm. Closing.