Learn REACT-NATIVE with Real Code Examples
Updated Nov 27, 2025
Installation Setup
Install Node.js, npm/yarn
Install React Native CLI: `npm install -g react-native-cli`
Create a new project: `npx react-native init MyApp`
Install required dependencies and run `npx pod-install` for iOS
Run app on simulator or device using `npx react-native run-ios` / `run-android`
Environment Setup
Install Node.js, npm/yarn
Install Xcode for iOS and Android Studio for Android
Install React Native CLI or use Expo
Initialize project and install dependencies
Run app on simulator or device
Config Files
package.json - dependencies and scripts
App.js - main entry point
index.js - platform bootstrap file
babel.config.js - transpiler configuration
metro.config.js - bundler configuration
Cli Commands
npx react-native init MyApp - create project
npx react-native run-ios - run iOS app
npx react-native run-android - run Android app
npx react-native start - start Metro bundler
npx react-native link <package> - link native dependencies
Internationalization
Use libraries like i18n-js or react-intl
Manage translations in JSON/YAML files
Support right-to-left layouts
Detect and apply device locale
Externalize all user-facing strings for translation
Accessibility
Support for VoiceOver and TalkBack
Accessible labels for buttons and images
Keyboard navigation for input fields
Focus management and ARIA roles
Test accessibility with Accessibility Inspector or similar tools
Ui Styling
StyleSheet API for inline styles
Flexbox for layout and responsive design
Theming via styled-components or Emotion
Support for images, SVGs, and icons
Animation support with Animated and Reanimated
State Management
Component-level state via useState/useReducer
Global state via Redux, MobX, or Context API
Async state management with Redux Saga or Thunk
Local persistence with AsyncStorage
Offline-first state handling via caching or SQLite
Data Management
Fetch remote data with fetch or Axios
Persist local data with AsyncStorage or SQLite
Manage forms and input validation
Cache frequently used data for performance
Synchronize state with backend APIs