161. How to debug React Native performance issues?
- a) React Native Debugger + Flipper
- b) Chrome DevTools profiling
- c) Xcode Instruments/Android Profiler
- d) All of the above
Answer: D - Each tool targets different layers (JS thread, native, UI).
162. What is the purpose of React Native's Hermes engine?
- a) Precompiles JavaScript to bytecode
- b) Enables synchronous native calls
- c) Both A and B
- d) Replaces Metro bundler
Answer: C - Improves startup time and reduces memory usage.
163. How to identify unnecessary re-renders in React?
- a) React DevTools Profiler
- b) why-did-you-render library
- c) Console.log in render
- d) Both A and B
Answer: D - DevTools shows render timing, WDYR explains causes.
164. What is the benefit of React Native's New Architecture?
- a) Direct C++ communication between JS and native
- b) Synchronous view updates
- c) Both A and B
- d) Automatic bundle splitting
Answer: C - JSI (JavaScript Interface) removes bridge serialization.
165. How to analyze React bundle size?
- a) source-map-explorer
- b) Webpack Bundle Analyzer
- c) Next.js @next/bundle-analyzer
- d) All of the above
Answer: D - Visualizes which dependencies contribute most to bundle.
166. What is TurboModules in React Native?
- a) Lazy-loaded native modules
- b) Type-safe native-JS communication
- c) Both A and B
- d) Replacement for React Native CLI
Answer: C - Part of New Architecture for better native interoperability.
167. How to debug React context re-renders?
- a) useContextSelector pattern
- b) Split contexts by concern
- c) React.memo on consumers
- d) All of the above
Answer: D - Prevents all consumers from re-rendering on any change.
168. What is Fabric in React Native?
- a) New rendering system
- b) Concurrent shadow tree updates
- c) Both A and B
- d) CSS-in-JS solution
Answer: C - Enables synchronous UI updates and better interoperability.
169. How to measure React component mount time?
- a) React Profiler "Commit" timeline
- b) performance.mark() API
- c) Custom useLayoutEffect hook
- d) Both A and B
Answer: D - Profiler shows component render durations.
170. What is the benefit of React Native's Codegen?
- a) Type-safe native module interfaces
- b) Automatic C++ code generation
- c) Both A and B
- d) JavaScript bundle optimization
Answer: C - Part of New Architecture for better type safety.
171. How to detect memory leaks in React?
- a) Chrome Memory tab snapshots
- b) React StrictMode warnings
- c) WeakMap usage
- d) Both A and B
Answer: D - StrictMode double-invokes effects to detect uncleanup.
172. What is the purpose of React Native's Yoga?
- a) Cross-platform layout engine
- b) Animation scheduling
- c) Bundle compression
- d) Native module bridging
Answer: A - Implements Flexbox layout in C++ (used by all RN views).
173. How to optimize React Native list performance?
- a) FlashList instead of FlatList
- b) getItemLayout prop
- c) windowSize adjustment
- d) All of the above
Answer: D - FlashList recycles cells like RecyclerView on Android.
174. What is the purpose of React's useDeferredValue?
- a) Delay non-urgent UI updates
- b) Replace debouncing
- c) Both A and B
- d) Animation timing control
Answer: A - Part of Concurrent React for prioritizing user input.
175. How to debug React Native navigation issues?
- a) React Navigation DevTools
- b) Flipper plugin
- c) Navigation state logging
- d) All of the above
Answer: D - Navigation state can become complex in deep stacks.
176. What is the benefit of React's useInsertionEffect?
- a) Inject styles before DOM mutations
- b) Replace all useLayoutEffect cases
- c) Better SSR support
- d) Animation sequencing
Answer: A - Designed specifically for CSS-in-JS libraries.
177. How to test React Native native modules?
- a) Jest + native mocks
- b) Detox for E2E
- c) Xcode/Android Studio unit tests
- d) All of the above
Answer: D - Requires testing at multiple integration levels.
178. What is the purpose of React's Offscreen API?
- a) Hide components without unmounting
- b) Improve list performance
- c) Both A and B
- d) Replace CSS display: none
Answer: C - Experimental API for background rendering.
179. How to optimize React Native startup time?
- a) Hermes engine
- b) Code splitting
- c) Pre-warming native modules
- d) All of the above
Answer: D - Native initialization often bottlenecks startup.
180. What is the purpose of React Native's Fast Refresh?
- a) Preserve component state on edit
- b) Faster than Hot Reloading
- c) Both A and B
- d) No relation to HMR
Answer: C - Combines benefits of HMR and full refresh.