I have a horizontal flatlist to render categories the problem is when scrolling the flatlist breaks and get reset as described blow:
flat list code:
<View style={styles.container}><CategorySelector category={allCategories} isSelected={(selectedCategory === null || allCategories.id === selectedCategory) ? true : false} /><FlatList horizontal data={I18nManager.isRTL ? categories.reverse() : categories} renderItem={renderCategoryList} keyExtractor={(item, index) => index.toString()} showsHorizontalScrollIndicator={false} /></View>