This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is @react-native-community/progress-view, a React Native library providing a cross-platform ProgressView component. The library supports iOS (UIProgressView), Android, macOS, and Windows platforms with both legacy and new React Native architecture (Fabric).
yarn lint- Run ESLint on the codebaseyarn test- Run Jest tests for JavaScript componentsyarn test:windows- Run Windows-specific testsyarn type-check- Run TypeScript type checkingyarn flow- Run Flow type checking
yarn ios- Run iOS example appyarn android- Run Android example appyarn windows- Run Windows example appyarn start- Start Metro bundleryarn start:macos- Start Metro for macOSyarn start:windows- Start Metro for Windows
yarn test js/__tests__/*- Run specific test files- Tests are located in
js/__tests__/and use Jest with React Native preset
The library implements platform-specific components that all expose the same JavaScript interface:
JavaScript Layer (js/ directory):
index.js- Main entry point exporting ProgressViewindex.d.ts- TypeScript definitions- Platform-specific implementations:
ProgressView.ios.js- iOS implementation using UIProgressViewProgressView.android.js- Android implementationProgressView.macos.js- macOS implementationProgressView.windows.js- Windows implementation
Native Component Generation:
- Uses React Native's codegen system for type-safe native components
RNCProgressViewNativeComponent.js- iOS/macOS native component specRNCProgressViewNativeComponentAndroid.js- Android native component specRNCProgressViewNativeComponentWindows.js- Windows native component spec
iOS/macOS (ios/ and macos/ directories):
- Objective-C implementation wrapping UIProgressView
- Supports both old and new architecture (Fabric)
- Fabric implementation in
ios/Fabric/uses C++ and the new renderer
Android (android/ directory):
- Java implementation with separate Paper and Fabric managers
src/paper/- Legacy architecture implementationsrc/fabric/- New architecture implementation
Windows (windows/ directory):
- C++/WinRT implementation
- Uses Visual Studio project structure
- React Native Config:
react-native.config.jsdefines platform-specific dependencies - CocoaPods:
react-native-progress-view.podspechandles iOS/macOS dependencies - Android Gradle:
android/build.gradlehandles Android dependencies - Codegen:
package.jsoncontainscodegenConfigfor automatic native component generation
js/index.js:3- Main component exportjs/index.d.ts:4-40- TypeScript interface definitionspackage.json:81-88- Codegen configuration for native componentsreact-native-progress-view.podspec:22-49- Fabric/Paper conditional compilation
The library supports both the old React Native architecture (Paper) and the new architecture (Fabric). The build system automatically selects the appropriate implementation based on the RCT_NEW_ARCH_ENABLED environment variable.
Each platform has slightly different prop support:
isIndeterminateprop is Windows-only- Image props (
progressImage,trackImage) work differently across platforms - Default styling varies by platform (iOS: 2px height, Android: 20px height)
- Unit tests focus on component rendering and prop validation
- Platform-specific test setups in
jest-setups/ - Example apps in
example/andfabric-example/for manual testing