'ReactTooltip' cannot be used as a JSX component.
See original GitHub issue(alias) class ReactTooltip
import ReactTooltip
'ReactTooltip' cannot be used as a JSX component.
Its instance type 'ReactTooltip' is not a valid JSX element.
Type 'ReactTooltip' is missing the following properties from type 'ElementClass': render, context, setState, forceUpdate, and 3 more.ts(2786)
Can’t seem to use it as just <ReactTooltip /> in my tsx code.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14
Top Results From Across the Web
'ReactTooltip' cannot be used as a JSX component. · Issue #624
Its instance type 'ReactTooltip' is not a valid JSX element. ... 'ReactTooltip' cannot be used as a JSX component. #624.
Read more >NPM package cannot be used as a JSX Component
I'm getting similar "TS2786: 'NumberFormat' cannot be used as a JSX component. Its instance type 'NumberFormat<unknown>' is not a valid JSX ...
Read more >Component from NPM module cannot be used as a JSX ...
I encountered this problem recently with 2 modules so far: react-tooltip and react-dates. Note: this issue only occurs if you are using TypeScript...
Read more >Component cannot be used as a JSX component in React
The error Component cannot be used as a JSX component occurs for multiple reasons, returning an array of JSX elements instead of a...
Read more >cannot be used as a jsx component. its return type 'reactnode ...
React class component cannot be used as a JSX component if returns type of ReactNode ... Its instance type 'ReactTooltip' is not a...
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 FreeTop 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
Top GitHub Comments
+1
Similar issue here. Just popped up this morning. Wondering if it was some downstream dependency that changed. Here is the full stack trace:
Edit: This solved my issue - https://stackoverflow.com/questions/71791347/npm-package-cannot-be-used-as-a-jsx-component-type-errors/71828113#71828113
Same issue here. Even with @types/react-tooltip installed.