I am making an app with React and Firebase. So, to interact with the database from the client (React), do I need an API? What are the upsides/downsides of using something like db.collection("cities").get() or using an API to make a request to
firestore.googleapis.com/v1/projects/YOUR_PROJECT_ID/databases/(default)/documents/cities