June 2018
Beginner to intermediate
394 pages
9h 2m
English
Firebase developers can trigger a function for particular document changes. In many cases, monitoring all documents is a waste of computing and also time consuming. If we know which document to monitor, it's best to use trigger for that document:
// Anticipates the changes `Teachers` in collection `College`exports.myFunctionName = functions.firestore .document('College/teachers').onWrite((event) => { // ... When new teacher joins the institution });
This code dictates that when a new teacher created in the college collection, it triggers a function that performs a specific action.
Read now
Unlock full access