#FlatList not working on IOS (React Native)

15 messages · Page 1 of 1 (latest)

solemn quest
#

I have simple Flat list code

import {
  FlatList,
  StyleSheet,
  View,
} from 'react-native';
import {
  SafeAreaView,
  SafeAreaProvider,
} from 'react-native-safe-area-context';

<SafeAreaProvider>
  <SafeAreaView style={styles.container}>
      <FlatList
          data={DATA}
          renderItem={({ item }) => (
            <View>
              <Text>{item.title}</Text>
            </View>
          )}
          keyExtractor={item => item.id}
        />
  </SafeAreaView>
</SafeAreaProvider>

It works on android and only works on android after a refresh when i change some code but if i refresh from developer console it breaks with error

Warning: Invariant Violation: View config getter callback for component `RCTScrollContentView` must be a function (received `undefined`).

I am using expo in development build

#

FlatList not working on IOS (React Native)

opal oxide
solemn quest
#

I got it fixed deleted all node modules and did new pre build and it worked 😓

opal oxide
#
npx react-native start --reset-cache

npx react-native run-ios
solemn quest
#

Golden rule for RN i guess just restart evrything once

#

was pulling my hair out from yesterday

opal oxide
opal oxide
solemn quest
#

cool will do it i am using pnpm with turbo repo actually

#

BE and mobile app are put in same repo idk if that could give me issues someday

opal oxide
#

shouldn't be an issue other than some shared package acting weird

solemn quest
#

hmm probably lets see how it goes

#

!resolved