You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
Add a feature to track the number of times users view each article.
This data can be used to create a "Trending" or "Most Popular" section on our app and it also helps us know the types of articles that users like reading.
Articles that are already added to the database will start at zero views.
The number of views for each article are stored in the "views" property. Not all articles will have the "views" property and for these articles, just assume that the number of views is zero.
The text was updated successfully, but these errors were encountered:
I mean that any article might not have the views property, even featured or articles on the homepage. The articles that don't have the views property will have this property added in firebase once the user views it at least one time.
This is because almost all of the articles in firebase don't have the views property so instead of adding the property to them all at once, we can update them as needed. So if views == null for any article, then assume 0 views. After the user has viewed the article for one time, then views property will be added.
Add a feature to track the number of times users view each article.
This data can be used to create a "Trending" or "Most Popular" section on our app and it also helps us know the types of articles that users like reading.
The text was updated successfully, but these errors were encountered: