Closed danielwinkler closed 4 years ago
Thanks @danielwinkler for raising the PR.
Does the workaround shared works for you? because you are calling cbGenerator() function which returns arrow function itself, which is similar to old implementation. I am not sure how this has helped you.
Thanks </ Pranav >
To be honest, I cannot explain why this fix helped. But I also cannot explain why I get the single invocation RuntimeException in the first place?
Do you have an idea why there seems to be a duplicate invocation?
The rationale behind the current fix was, that there might have been some optimization going on in RN because of the static function and the generation of the Android callback. If it was pure JS/TS then your approach
RNTooltips.Show(target, parent, props, () => {
props.onHide && props.onHide();
});
will generate a new function with every iteration, so no need to add my workaround.
I just realized I got another such exception with the PR, so you can ignore it. Still, it would be great if we could fix the problem!
Thanks @danielwinkler for sharing detailed explanation. I will look into it, why callback is getting called multiple times. I will update you once I have a fix.
Thanks
@prscX did you have any luck with the bug?
Visibility of the tooltip is hooked up to pressing a button too short. With that the tooltip may show up and disappear quickly. If that happens, the following exception is raised, which doesn't really make sense.
I could not reproduce it with debug and local release builds. However, once it was published and coming from the store, it is easily reproducable
I fixed by adding a workaround that would generate a new callback with each call of
Tooltip.Show