-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make compatible with RN 49+, refactored and added onHide and onShow props #36
Conversation
ToolTip.ios.js
Outdated
const ToolTipMenu = NativeModules.ToolTipMenu; | ||
const RCTToolTipText = requireNativeComponent('RCTToolTipText', null); | ||
|
||
export let isToolTipVisible = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would put this in the component and expose via ref. this.refs.tooltip.isToolTipVisible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the idea is to use it as an import.
if you have multiple tooltip components and you want to know if there is at least one of those components showing the tooltip without looping though all of them.
does it make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you have multiple tooltip components and you want to know if there is at least one of those components showing the tooltip without looping though all of them.
That sounds like a state that should live in your application then. It's little weird to keep this global export in a library.idk
lgtm otherwise |
@chirag04 agree, I removed the |
@enahum i guess update the readme also and merge. |
This is a much bigger refactor than my PR, which works for me up to and including RN 0.53. Looks like a nice cleanup, if everything still works the same! |
@fungilation yeap everything works the same ;) @chirag04 readme updated and merging... |
@chirag04 let me know if it is ok to merge and how can we do the update of the npm library ;)