Check out example codes for "remove child from firebase swift". It will help you in understanding the concepts better.

Code Example 1

// Remove the post from the DB
  ref.child("posts").child(postId).removeValue { error in
    if error != nil {
        print("error \(error)")
    }
  }

Learn ReactJs, React Native from akashmittal.com