Check out example codes for "swift uicollectionviewcell how to know when off screen". It will help you in understanding the concepts better.

Code Example 1

func collectionView(_ collectionView: UICollectionView,
                 didEndDisplaying cell: UICollectionViewCell,
                   forItemAt indexPath: IndexPath) {
    if let cell = collectionView.cellForItem(at: indexPath) {
      // Do something
    }
  }

Learn ReactJs, React Native from akashmittal.com