Open pocha opened 9 months ago
Home page init should
onChildAdded
to add new expenses on the UI onChildRemoved
to remove the tag from the UI Detail page init should
onChildAdded
to add the new expense in the Expenses UI. Also update the monthly sum for the month for the UI onChildRemoved
to remove the expense from the UI & reduce the monthly sum.
Realtime DB data structure here
For our case, the data need to be like
Populate some data manually in Realtime DB for a user including tag + expenses & show the data in home & detail screen
For reading data from the Firebase DB, use
onValue()
rather usingget()
as explained here