Check out example codes for "swift uitableview insert cell". It will help you in understanding the concepts better.
Code Example 1
self.yourArray.append(msg)
self.tblView.beginUpdates()
self.tblView.insertRows(at: [IndexPath.init(row: self.yourArray.count-1, section: 0)], with: .automatic)
self.tblView.endUpdates()
Learn ReactJs, React Native from akashmittal.com