ERROR Warning: Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.
4 |
5 | function AppLayoutContents() {
> 6 | const { data } = useSuspenseQuery2();
| ^
7 | console.log('data', data);
8 |
9 | return (
Call Stack
TabLayout(./(app)/(tabs)/_layout.tsx) (<anonymous>)
ScreenContentWrapper (<anonymous>)
RNSScreenStack (<anonymous>)
AppLayoutContents (app/(app)/_layout.tsx:6:37)
AppLayout(./(app)/_layout.tsx) (<anonymous>)
RootLayout(./_layout.tsx) (<anonymous>)
RNCSafeAreaProvider (<anonymous>)
App (<anonymous>)
ErrorOverlay (<anonymous>)
- Clone this repo
- Run
npm install
- Run
npx expo start
to start the development server - Ensure you're in Expo Go. Press s to switch to Expo Go if you're in development build. If you already have an app open in Expo Go, make sure to quit out first.
- Press i to open iOS simulator and reproduce.
- Press a to open Android simulator and reproduce.
- Clone this repo
- Run
npm install
- Run
npx expo prebuild
- Run
npx expo run:ios
to reproduce on iOS - Run
npx expo run:android
to reproduce on Android- Ensure you have set your ANDROID_HOME environment variable to the path of your Android SDK, which can be found in Android Studio Settings. This will usually be
export ANDROID_HOME=$HOME/Library/Android/sdk
- Ensure you have set your ANDROID_HOME environment variable to the path of your Android SDK, which can be found in Android Studio Settings. This will usually be