React Native Async Storage set item function
问题 I am using async storage in my items listing app. The problem i am facing is that, my first item does not get stored in the async till i enter the second item. i am saving array of objects with the help of react hooks E.g if I enter items as 1)Apples 2)Bananas then only apples will get saved in the async while bananas will not be saved until i enter the third item. const [getWant, setwant] = useState([]); const saveData = async () => { AsyncStorage.clear() try { await AsyncStorage.setItem("