Estoy tratando de hacer una aplicación crud simple, pero recibo este error al actualizar el documento: [Unhandled promise rejection: TypeError: t is not an Object. (evaluating '"_delegate" in t')]
Aquí está el siguiente código de lo que hago:
//update user const updateUser = async (id, age) => { const newFields = {age: age + 1}; const userDoc = doc(usersRef, id) await updateDoc(id, newFields).then(console.log('updated succesfully')) }; //jsx {users.map((user) => { return ( <View key={user.name} style={{ width: "30%", marginLeft: "35%", marginBottom: 20 }}> <Text>name: {user.name}</Text> <Text>age: {user.age}</Text> <Button onPress={() => updateUser(user.id, user.age)} title="increase age" /> </View> ); })}Gracias.