rn-tourguide
rn-tourguide copied to clipboard
Tooltip is shown for a split second, disappears, and then only showing properly
The default tooltip flickers before fading in. Moving this.state.opacity.setValue(0)
to before this.props.next()
solved it for me. Not sure if it causes any problems elsewhere.
Can you provide a PR ?
is this issue fixed?
Experiencing the same issue. Any fix for this?
[EDIT] Moving this.state.opacity.setValue(0) to before this.props.next() solved it for me. Not sure if it causes any problems elsewhere. (WORKED FOR ME)
Go into node_modules/rn-tourguide/lib/components/Modal.js. In this.handleNext function add this.state.opacity.setValue(0) before this.props.next().
Here is the diff:
diff --git a/node_modules/rn-tourguide/lib/components/Modal.js b/node_modules/rn-tourguide/lib/components/Modal.js
index f848302..e1d65dd 100644
--- a/node_modules/rn-tourguide/lib/components/Modal.js
+++ b/node_modules/rn-tourguide/lib/components/Modal.js
@@ -26,6 +26,7 @@ let Modal = (() => {
this.layout = layout;
};
this.handleNext = () => {
+ this.state.opacity.setValue(0);
this.props.next();
};
this.handlePrev = () => {
@@ -130,7 +131,7 @@ let Modal = (() => {
delay: duration,
useNativeDriver: true,
});
- this.state.opacity.setValue(0);
+
if (toValue !== this.state.tooltipTranslateY._value &&
!((_a = this.props.currentStep) === null || _a === void 0 ? void 0 : _a.keepTooltipPosition)) {
Animated.parallel([translateAnim, opacityAnim]).start();
You can use https://www.npmjs.com/package/patch-package as it doesn't look like this is getting updated any time.