Available APIs
UI and Interaction
Alert
Display native alert dialogs and prompts
Keyboard
Control and respond to keyboard events
Animation
Animated
Powerful animation library for creating smooth animations
App Lifecycle
AppState
Monitor app foreground/background state
Device Information
Dimensions
Get device screen dimensions
Platform
Platform-specific code and information
Navigation and Linking
Linking
Handle deep links and external URLs
Styling
StyleSheet
Create and manage component styles
Usage Patterns
Most React Native APIs follow consistent patterns:Importing APIs
Event Listeners
Many APIs provide event listeners that return a subscription object:Platform-Specific Code
Use the Platform API to write platform-specific code:Best Practices
Use hooks for lifecycle events
Use hooks for lifecycle events
Prefer using
useEffect to set up and clean up event listeners:Optimize animations with native driver
Optimize animations with native driver
Use
useNativeDriver: true in Animated APIs for better performance:Handle dimensions changes
Handle dimensions changes
Listen for dimension changes to support device rotation: