We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ab31de commit 14f9368Copy full SHA for 14f9368
1 file changed
packages/docs-gesture-handler/src/examples/GestureStateFlowExample/index.tsx
@@ -34,8 +34,15 @@ export default function App() {
34
const isDesktopMode = dimensions.width > MIN_DESKTOP_WIDTH;
35
36
useEffect(() => {
37
- resetPan();
38
- resetLongPress();
+ // Timing issue, neither useEffect, useLayoutEffect or requestAnimationFrame work
+ const timeout = setTimeout(() => {
39
+ resetPan();
40
+ resetLongPress();
41
+ }, 300);
42
+
43
+ return () => {
44
+ clearTimeout(timeout);
45
+ };
46
}, [resetLongPress, resetPan]);
47
48
0 commit comments