Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React hooks error when switching screen via bottom tabs #322

Open
achou11 opened this issue May 7, 2024 · 0 comments
Open

React hooks error when switching screen via bottom tabs #322

achou11 opened this issue May 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@achou11
Copy link
Member

achou11 commented May 7, 2024

Warning: React has detected a change in the order of Hooks called by BottomTabView. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
1. useState                   useState
2. useState                   useState
3. useContext                 useContext
4. undefined                  useContext
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    in BottomTabView (at createBottomTabNavigator.tsx:118)
    in PreventRemoveProvider (at useNavigationBuilder.tsx:718)
    in NavigationContent (at useComponent.tsx:35)
    in Unknown (at createBottomTabNavigator.tsx:117)
    in BottomTabNavigator (at AppScreens.tsx:154)
    in HomeTabs (at AppScreens.tsx:223)
    in SharedLocationContextProvider (at AppScreens.tsx:222)
    in StaticContainer
    in EnsureSingleNavigator (at SceneView.tsx:124)
    in SceneView (at useDescriptors.tsx:218)
    in RCTView (at View.js:116)
    in View (at DebugContainer.native.tsx:27)
    in DebugContainer (at NativeStackView.native.tsx:82)
    in MaybeNestedStack (at NativeStackView.native.tsx:326)
    in RCTView (at View.js:116)
    in View (at NativeStackView.native.tsx:319)
    in RNSScreen (at createAnimatedComponent.js:54)
    in Unknown (at src/index.native.tsx:314)
    in Suspender (at src/index.tsx:40)
    in Suspense (at src/index.tsx:39)
    in Freeze (at src/index.native.tsx:206)
    in DelayedFreeze (at src/index.native.tsx:313)
    in InnerScreen (at src/index.native.tsx:566)
    in Screen (at NativeStackView.native.tsx:244)
    in SceneView (at NativeStackView.native.tsx:385)
    in Suspender (at src/index.tsx:40)
    in Suspense (at src/index.tsx:39)
    in Freeze (at src/index.native.tsx:206)
    in DelayedFreeze (at src/index.native.tsx:220)
    in RNSScreenStack (at src/index.native.tsx:227)
    in ScreenStack (at NativeStackView.native.tsx:373)
    in NativeStackViewInner (at NativeStackView.native.tsx:446)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:92)
    in SafeAreaProvider (at SafeAreaProviderCompat.tsx:46)
    in SafeAreaProviderCompat (at NativeStackView.native.tsx:445)
    in NativeStackView (at createNativeStackNavigator.tsx:72)
    in PreventRemoveProvider (at useNavigationBuilder.tsx:718)
    in NavigationContent (at useComponent.tsx:35)
    in Unknown (at createNativeStackNavigator.tsx:71)
    in NativeStackNavigator (at AppNavigator.tsx:69)
    in AppNavigator (at App.tsx:52)
    in Suspense (at App.tsx:51)
    in SecurityProvider (at App.tsx:50)
    in PhotoPromiseProvider (at App.tsx:49)
    in ActiveProjectProvider (at App.tsx:48)
    in ApiProvider (at App.tsx:47)
    in LocalDiscoveryProvider (at App.tsx:46)
    in ServerLoading (at App.tsx:45)
    in PortalProviderComponent (at BottomSheetModalProvider.tsx:190)
    in BottomSheetModalProviderWrapper (at ExternalProviders.tsx:34)
    in EnsureSingleNavigator (at BaseNavigationContainer.tsx:430)
    in BaseNavigationContainer (at NavigationContainer.tsx:132)
    in ThemeProvider (at NavigationContainer.tsx:131)
    in NavigationContainerInner (at ExternalProviders.tsx:33)
    in GPSModalContextProvider (at ExternalProviders.tsx:32)
    in TrackTimerContextProvider (at ExternalProviders.tsx:31)
    in RNGestureHandlerRootView (at GestureHandlerRootView.android.tsx:21)
    in GestureHandlerRootView (at ExternalProviders.tsx:30)
    in QueryClientProvider (at ExternalProviders.tsx:29)
    in ExternalProviders (at App.tsx:44)
    in IntlProvider (at IntlContext.tsx:44)
    in IntlProvider (at App.tsx:43)
    in App (at withDevTools.js:18)
    in withDevTools(App) (at renderApplication.js:57)
    in RCTView (at View.js:116)
    in View (at AppContainer.js:127)
    in RCTView (at View.js:116)
    in View (at AppContainer.js:155)
    in AppContainer (at renderApplication.js:50)
    in main(RootComponent) (at renderApplication.js:67)

Reproduction steps:

  1. Start app
  2. Press camera or observations bottom tab
@achou11 achou11 added the bug Something isn't working label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant