Closed jasonkv closed 2 years ago
Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).
Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
react-native-pager-view
(found: 5.4.9
, latest: 5.4.15
)react-native
(found: 0.64.3
, latest: 0.68.2
)expo
(found: 44.0.0
, latest: 45.0.4
)Can you verify that the issue still exists after upgrading to the latest versions of these packages?
Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.
getting same issue in ios for version 3.1.1
Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.
Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.
JOKE.
We need a solution for the issue.
Current behavior
On iOS (Android works fine) there is a hard crash (no logs) that happens if index in navigationState is updated too quickly.
This happens when a user might press a button to switch to the next tab too quickly (multiple times in a row):
Example code to reproduce (roughly):
The problem seems to be in a library
react-native-pager-view
used insidePagerViewAdapter
. This component calls:pagerRef.current?.setPage(index);
Which if switched to:
pagerRef.current?.setPageWithoutAnimation(index);
With this change, it seems to work fine but lacks the animation.
Note: There is no crash if navigating through the tabs via quickly swiping instead of pressing the buttons to navigate through the tabs.
Expected behavior
For it to not crash.
Reproduction
Example Provided above
Platform
Environment