Its instance type 'ReactTooltip' is not a valid JSX element.
See original GitHub issueFew days ago newest version of React tooltip return error ‘ReactTooltip’ cannot be used as a JSX component. Its instance type ‘ReactTooltip’ is not a valid JSX element. The types returned by ‘render()’ are incompatible between these types. Type ‘React.ReactNode’ is not assignable to type ‘import(“/node_modules/@types/react-dom/node_modules/@types/react/index”).ReactNode’. TS2786
> 68 | <ReactTooltip />
| ^
69 | </>
70 | );
71 |
I added pull request with potential fix, please take a look @wwayne or anyone else
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
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. Type 'ReactTooltip' is missing the following properties from type 'ElementClass ...
Read more >NPM package cannot be used as a JSX Component
Its instance type 'ReactTimeago<keyof IntrinsicElements | ComponentType<{}>>' is not a valid JSX element. The types returned by 'render()' are ...
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. ... Its return type 'Element[]' is not a valid JSX...
Read more >'view' cannot be used as a jsx component. its instance type ...
Sometimes, we want to fix the error 'Component cannot be used as a JSX component. Its return type 'Element[]' is not a valid...
Read more >Component cannot be used as a JSX component in React
Returning any value other than a JSX element or `null` from a component. ... Its return type 'Element[]' is not a valid JSX...
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
Hi Daniel, works perfect! you can close it, thanks
Any fixes/updates for npm will be helpful! Thanks in advance.