react-native-progress provides a suite of customizable progress indicators and spinners for React Native applications, leveraging either `react-native-svg` or the `react-native-art` package for rendering. It offers various styles including `Bar`, `Pie`, `Circle`, and `CircleSnail` components, allowing developers to visually represent asynchronous operations or loading states. The current stable version is 5.0.1, with a history of frequent updates to maintain compatibility with newer React Native versions and address rendering issues. Its key differentiators include a simple API for common progress types and the flexibility to opt out of the `react-native-svg` dependency if only the `ProgressBar` is needed via deep imports, making it adaptable to different project dependency profiles. The library ships with TypeScript typings, enhancing development experience for TypeScript users.
npm install react-native-progressVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to import and use the various progress components (Bar, Pie, Circle, CircleSnail), showcasing both determinate and indeterminate states with custom styling.
Ensure `react-native-svg` is installed in your project: `npm install react-native-svg` or `yarn add react-native-svg`. Follow its installation instructions for linking if necessary for older RN versions.
Upgrade to React Native 0.60+ or ensure your ART setup is compatible. Review any custom component logic for deprecated lifecycle methods.
Install `react-native-svg` (`npm install react-native-svg`) or use deep imports like `import ProgressBar from 'react-native-progress/Bar';` if only the bar component is needed.
Set the `useNativeDriver` prop explicitly to `true` or `false` (default is `false`) on `Progress.Bar` to suppress the warning, e.g., `<Progress.Bar useNativeDriver={false} ... />`.Install `react-native-svg` (`npm install react-native-svg`) and ensure it's properly linked according to its documentation, especially for React Native versions prior to 0.60 where autolinking might not cover all cases. Clean your build cache if needed.
Explicitly set `useNativeDriver={false}` (or `true` if appropriate and supported for your animation config) on your `Progress.Bar` component. Update to `react-native-progress` v4.1.1 or higher to mitigate this for default scenarios.Ensure that `react-native-art` or the `@react-native-community/art` package is correctly installed and linked in your project. Check React Native version compatibility with the `react-native-progress` version and its ART dependency.