I'm creating a ride-hailing app, and I'm stuck on a problem. When the driver app is en route to pick up the rider in the middle of the booked ride, what I want to do is, if the rider cancels the ride, update the status to 'cancelled' in the riderequest table in Firebase. What I want is for my page to constantly check for the status, and as soon as it is cancelled, navigate to the cancel ride page.
How can I have my page constantly check for the change in variable, and when the change happens, how can I redirect it to another page?