Check out example codes for "swipe to delete xcode". It will help you in understanding the concepts better.

Code Example 1

override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
        
        if editingStyle == .delete {
            terms.remove(at: indexPath.row)
            tableView.deleteRows(at: [indexPath], with: .bottom)
        }
    }
    // terms is array var

Learn ReactJs, React Native from akashmittal.com