React Native: Inserting new object inside Array
问题 after successfully implementing sockets, i can now listen to my event from one screen to another. My problem now is that i want to display the new object that i obtained inside my flatlist. Here is the new msg object: messages: Object { "conversationId": 33, "message": "Heyy", "receiverId": 43, "senderId": 53, } Here is my code: const [listings, setListings] = useState([]); const loadListings = async () => { setLoading(true); const response = await messagesApi.getMessages(); setLoading(false)