Book Image

React Native By Example

By : Richard Kho
Book Image

React Native By Example

By: Richard Kho

Overview of this book

React Native's ability to build performant mobile applications with JavaScript has resulted in its popularity amongst developers. Developers now have the luxury to create incredible mobile experiences that look and feel native to their platforms with the comfort of a well-known language and the popular React.js library. This book will show you how to build your own native mobile applications for the iOS and Android platforms while leveraging the finesse and simplicity of JavaScript and React. Throughout the book you will build three projects, each of increasing complexity. You will also link up with the third-party Facebook SDK, convert an app to support the Redux architecture, and learn the process involved in making your apps available for sale on the iOS App Store and Google Play. At the end of this book, you will have learned and implemented a wide breadth of core APIs and components found in the React Native framework that are necessary in creating great mobile experiences.
Table of Contents (17 chapters)
Title Page
About the Author
About the Reviewer
Customer Feedback

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 between 0 and 1 that tracks the value of the progress bar
  • progressTintColor: This is a string that sets the color of the progress bar

You can render a ProgressViewIOS component like this:

    progress={ 0.75 } 
    progressTintColor={ '#86B2CA' } 

In this section, we should update Expenses to do the following things:

  • First, we should modify the checkCurrentMonthBudget function from storageMethods to also return the amount spent for the month
  • Then, App.js should have its _updateBudget function updated to account for the amount...