Support Typescript + React
See original GitHub issueThis doesn’t appear to work in a Typescript project using React. If I use the lower case <wired-button>, Typescript gives the error, Property 'wired-button' does not exist on type 'JSX.IntrinsicElements'. If I use <WiredButton> as if it were a React component, I get a runtime error, TypeError: Class constructor WiredButton cannot be invoked without 'new'. Is there any way to fix one/both of these errors, or modify the library so it can be used in Typescript + React projects?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
React - TypeScript: Documentation
TypeScript supports JSX and can correctly model the patterns used in React codebases like useState . Getting Set Up With a React Project....
Read more >Static Type Checking - React
Static type checkers like Flow and TypeScript identify certain types of problems before you even run your code. They can also improve developer...
Read more >How to use TypeScript with React: A tutorial with examples
Support for existing React projects ... TypeScript allows you gradually adapt its usage in your existing projects. You can also configure the ...
Read more >Adding TypeScript - Create React App
Global installs of create-react-app are no longer supported. To add TypeScript to an existing Create React App project, first install it: npm ...
Read more >Using TypeScript with React - DigitalOcean
This tutorial covers how to use TypeScript with React functional or ... First, install the React dependencies react and react-dom :.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m getting this same error in 2021. Next.js + Typescript environment
Have successful setup of wired elements in react + ts project. What I did:
src/wired.d.tsto have proper typings: