Updating App.js with ProgressViewIOS
When planning this app in the last chapter, we wrote that this list should also prominently display the user's set budget for the month along with a progress indicator showing how close they are to hitting their budget.
Using ProgressViewIOS
, we can depict our user's progress toward their monthly limit. The following props will be used in this project:
progress
: This is a number between0
and1
that tracks the value of the progress barprogressTintColor
: This is a string that sets the color of the progress bar
You can render a ProgressViewIOS
component like this:
<View> <ProgressViewIOS progress={ 0.75 } progressTintColor={ '#86B2CA' } /> </View>
In this section, we should update Expenses
to do the following things:
- First, we should modify the
checkCurrentMonthBudget
function fromstorageMethods
to also return the amount spent for the month - Then,
App.js
should have its_updateBudget
function updated to account for the amount...