Check out example codes for "check if gorm created successfully". It will help you in understanding the concepts better.
Code Example 1
if err := db.Create(&Animal{Name: "Giraffe"}).Error; err != nil {
// Create failed, do something e.g. return, panic etc.
return
}
Learn ReactJs, React Native from akashmittal.com