React Native FlatList display on Scroll

I’m making a flatlist in wich I display the informations on the user scroll. But I don’t know why I got this error : ERROR Warning: Encountered two children with the same key, 4. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or… Read More React Native FlatList display on Scroll

How to remove data from Flatlist using deleted icon in react native

function Three({ navigation, route }) { const Data = [ { id: route.params.paramKey, name: route.params.paramKey1, note: route.params.paramKey2, desc: route.params.paramKey3, } ]; const Delete=()=>{ setInfo("") } const renderItem = ({ item }) => ( <View style={{ backgroundColor: ‘yellow’, height: 160, width: 350, borderRadius: 15, paddingLeft: 10, marginTop: 30, marginLeft: 10 }}> <Text style={{ color: ‘black’, fontSize:… Read More How to remove data from Flatlist using deleted icon in react native

FlatList render item function does not let access passed parameters properties

I am making an API call to a .NET Core API from a React Native App with Axios. On one screen I had the similar code that works perfectly but it does not work here and throws an error: [Unhandled promise rejection: TypeError: undefined is not an object (evaluating ‘request.title’)] at node_modules\react-native\Libraries\Lists\FlatList.js:597:25 in renderer at… Read More FlatList render item function does not let access passed parameters properties

apply style when 2 adjacent items have different attribute

I have an array of objects like: {"code": 123, "description": "Item 1", "group": 2}, {"code": 211, "description": "Item 2", "group": 2}, {"code": 234, "description": "Item 3", "group": 3}, {"code": 255, "description": "Item 4", "group": 4}, {"code": 311, "description": "Item 5", "group": 4}, I have a FlatList <FlatList data={products} … renderItem={({item, i }) => { return… Read More apply style when 2 adjacent items have different attribute

Flatlist createRef().current is null when opening sidemenu

I’m using React Native and have built an autoscrolling Flatlist using the component ref to access the scrollToIndex method. All works fine, until I open the SideMenu which somehow causes flatList.current to become null, causing an application error. I wonder if anyone know why this is occuring? Appreciate the help. Thanks App.js import React, {useState}… Read More Flatlist createRef().current is null when opening sidemenu