Measuring progress
The downside of just indicating that progress is being made is that there’s no end in sight for the user. This leads to a feeling of unease, like when you’re waiting for food to cook in a microwave with no timer. When you know how much progress has been made and how much is left to go, you feel better. That is why it’s always better to use a deterministic progress bar whenever possible.
Unlike the ActivityIndicator
component, there’s no platform-agnostic component in React Native for progress bars. So, we’ll use the react-native-progress
library for rendering progress bars.
In the past, React-Native had special components for showing progress bars for iOS and Android, but due to React-Native size optimization, the Meta team is working on moving such components to separate packages. So, ProgressViewIOS
and ProgressBarAndroid
have been moved outside of the React-Native library.
Now, let’s build the...