slmgc / react-hint

Tooltip component for React, Preact, Inferno
https://react-hint.js.org/
MIT License
335 stars 28 forks source link

[Bug] Tooltip breaks in specific cases, causes infinite re-renders and crashes #49

Closed essensx closed 3 years ago

essensx commented 4 years ago

Not completely sure what is happening here, seems since the lib can't properly position the tooltip, it tries to reposition it infinitely.

Sample: https://codesandbox.io/s/awesome-ellis-yyjyf

Steps To Reproduce

Result

App crashes, React throws an exception of setState depth reached.

ranihorev commented 4 years ago

Here is a fix - https://github.com/slmgc/react-hint/pull/50

essensx commented 4 years ago

Any updates?

slmgc commented 4 years ago

@essensx whoah, looks like I totally missed that issue, sorry about that. @ranihorev thanks a lot for the fix, I started the review, will try to check everything this weekend.

davidesigner commented 3 years ago

Hi @slmgc, could you merge the fix of @ranihorev #50 please? Thank you!

slmgc commented 3 years ago

Hi everyone, sorry for not responding on time :/ Merged and released a new version with the fix, thanks a lot @essensx and @ranihorev