TS2605 JSX element type 'Button' is not a constructor function for JSX elements.

UI Components for React
Post Reply
User avatar
CodeMonkey
Posts: 6
Joined: 12 Dec 2012, 09:55

26 Mar 2021, 04:39

I recently have been playing around with JSX and everything works fine; but trying to convert to TypeScript (TSX) I run into issues. Lots of Stackoverflow posts are pointing to setting "allowSyntheticDefaultImports": true in my tsconfig.json; but it's already set. Has anyone else run into this issue?

Code: Select all

JSX element type 'Button' is not a constructor function for JSX elements.  TS2605

    33 |     return (
    34 |       <div>
  > 35 |         <Button />
       |         ^

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests