React native – state does not get updated inside renderItem function in SwipListView
As explained stateItem throws an error, and when I console.log stateItem after I set the state it comes out as null. Can someone please tell me why this happens? The code is below: const [stateItem, setStateItem] = useState(null); <SwipeListView data={list}…