react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.47k stars 5.01k forks source link

[react-native-tab-view] has issue with animationEnabled on iOS while switching tabs #12082

Closed thaindangelhack closed 3 days ago

thaindangelhack commented 1 month ago

Current behavior

Details:

Current evidence:

https://github.com/user-attachments/assets/f65a1c89-2947-4b29-946a-f492483cea0e

After set animationEnabled={false} in TabView

    <TabView
      navigationState={{ index, routes }}
      renderScene={renderScene}
      lazy={true}
      renderTabBar={() => null}
      onIndexChange={changedIndex => handleSwipeIndexChange(changedIndex)}
      initialLayout={{ width: layout.width }}
      lazyPreloadDistance={1}
      animationEnabled={false}
    />

The error is gone, but the animation will not be usable. https://github.com/user-attachments/assets/be5b6008-3103-4731-a5e7-7e893691a517 Solution I find in that https://github.com/react-navigation/react-navigation/issues/11874#issuecomment-2035589010

Expected behavior

can fix the above error and still use animation

Reproduction

/

Platform

Packages

Environment

package version
@react-navigation/native 6.1.2"
@react-navigation/bottom-tabs
@react-navigation/drawer
@react-navigation/material-top-tabs
@react-navigation/stack
@react-navigation/native-stack
react-native-safe-area-context
react-native-screens
react-native-gesture-handler
react-native-reanimated
react-native-tab-view 3.5.2
react-native-pager-view 5.4.15
react-native 0.68.7
expo
node 16.15.1
npm or yarn
github-actions[bot] commented 1 month ago

Hey @thaindangelhack! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

github-actions[bot] commented 1 month ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

github-actions[bot] commented 1 week ago

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.