skip to Main Content

How to print updated state value in React Native

const filteredata= basketdata.filter(obj => { return obj.id !== item.id; }); setBasket([...filteredata]); console.log('basketdata',basketdata); I am removing items from my array when same items available. After removing item trying to print the array in console but it doesn't printing the actual value.…

VIEW QUESTION
Back To Top
Search