React Native Research & Evidence-Based Practice 3 — Questions and Answers
Question 1: Empirical studies on cross-platform React Native code reuse report what typical percentage of shared code between iOS and Android when using a single codebase?
- 25–40%
- 50–65%
- 70–90% (Correct answer)
- 99–100%
Correct answer: 70–90%
Industry reports from teams like Airbnb and Discord estimate 70–90% shared code, with platform-specific files handling the remainder via the .ios.js / .android.js convention.
Question 2: Research into React Native state management shows which library has become the evidence-based default for global state in large-scale apps as of 2024?
- MobX
- Redux Toolkit (RTK) (Correct answer)
- Context API alone
- Recoil
Correct answer: Redux Toolkit (RTK)
Redux Toolkit eliminates Redux boilerplate and is the official, community-validated evolution of Redux, consistently ranked as the top production state management choice in React Native surveys.
Question 3: A developer is evaluating navigation libraries. According to community adoption data and React Native docs, which library is the recommended standard?
- react-navigation (Correct answer)
- react-native-navigation (Wix)
- expo-router
- React Router Native
Correct answer: react-navigation
react-navigation is the React Native team's recommended navigation solution and has by far the largest community adoption, ecosystem support, and documentation.
Question 4: Evidence-based testing strategy for React Native recommends the primary tool for component-level unit tests that avoid testing implementation details?
- Enzyme
- React Native Testing Library (RNTL) (Correct answer)
- Detox
- Jest snapshots alone
Correct answer: React Native Testing Library (RNTL)
React Native Testing Library encourages testing user-visible behavior (what the user sees and interacts with) rather than implementation details, aligning with modern testing best practices.
Question 5: Research on React Native accessibility shows which prop is the most critical for making custom touchable elements understandable to screen readers?
- accessibilityHint
- accessibilityLabel
- accessibilityRole (Correct answer)
- importantForAccessibility
Correct answer: accessibilityRole
accessibilityRole communicates the semantic role of an element (button, link, header, etc.) to assistive technologies, which is the highest-priority prop for screen reader comprehension.
Question 6: When conducting research on React Native app security, which storage method is evidence-based best practice for storing sensitive tokens on device?
- AsyncStorage
- SQLite via expo-sqlite
- react-native-keychain (Keychain/Keystore) (Correct answer)
- MMKV storage
Correct answer: react-native-keychain (Keychain/Keystore)
react-native-keychain stores secrets in iOS Keychain and Android Keystore, both OS-level secure enclaves, which is the evidence-backed approach for sensitive token storage.
Question 7: Based on React Native documentation and community research, what is the recommended approach for handling different screen sizes and densities?
- Hardcode pixel values for each target device resolution
- Use Dimensions API values divided by a fixed constant
- Use Flexbox layout with percentage-based dimensions (Correct answer)
- Scale all styles using a custom PixelRatio utility
Correct answer: Use Flexbox layout with percentage-based dimensions
Flexbox is React Native's built-in, cross-platform layout system designed to adapt to varying screen sizes without requiring hardcoded dimensions.
Empirical studies on cross-platform React Native code reuse report what typical percentage of shared code between iOS and Android when using a single codebase?