Check out example codes for "coreData line of code". It will help you in understanding the concepts better.

Code Example 1

if let contex = (UIApplication.shared.delegate as? AppDelegate)?.persistentContainer.viewContext {}
(UIApplication.shared.delegate as? AppDelegate)?.
// saving context
(UIApplication.shared.delegate as? AppDelegate)?.saveContext()

  if let context = (UIApplication.shared.delegate as? AppDelegate)?.persistentContainer.viewContext {

Learn ReactJs, React Native from akashmittal.com