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

The previous month's expenses

The next step that we want to carry out is to create a view that shows us the expenses for each month and then allows the user to enter that view by tapping on one of these months. This view should be navigated to when the user long presses on a month in the PreviousMonthsList component.

Thankfully, we already have a component that can handle this for us. In the last chapter, we built the CurrentMonthExpenses component that renders the expenses for a given month.

So far in our app, CurrentMonthExpenses is being rendered in just one place--App.js. The container that it renders within has a top margin offset to accommodate the navigation bar.

If we want to reuse the CurrentMonthExpenses component to render any ...

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