question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Its instance type 'ReactTooltip' is not a valid JSX element.

See original GitHub issue

Few 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:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
DenisGoldcommented, Oct 14, 2022

Hi Daniel, works perfect! you can close it, thanks

2reactions
ronakiihglobalcommented, May 2, 2022

Any fixes/updates for npm will be helpful! Thanks in advance.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found