O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying the current month's expenses

The next feature we wrote about earlier in this chapter was that if the expense is saved, it should then be rendered in a list on the main screen that contains the button to add further expenses.

In this section, we will create that list. We should create a component called CurrentMonthExpenses and make modifications to the existing files to support it.

You should add a new function to storageMethods that accepts a month and year, returning the budget, list of expenses, and the amount spent for that month and year.

The CurrentMonthExpenses component should do the following things:

  • Render a header that shows the current month's name and budget.
  • Display a ListView of the month's expenses, retrieved from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required