React - MCQ Questions and Answers

Test your knowledge of React with these interactive multiple-choice questions.

« First 6 7 8 9 Last »
« Previous Page Next Page »

121. What is the primary benefit of React 19's Actions feature?

  • a) Simplified data mutations with automatic pending states
  • b) Replacement for useEffect
  • c) Built-in API caching
  • d) Automatic WebSocket integration
Answer: A - Actions handle async operations with integrated loading/error states.

122. How to integrate WebAssembly with React?

  • a) wasm-pack + React hooks
  • b) Emscripten-generated JS glue code
  • c) Custom React reconciler
  • d) Both A and B
Answer: D - WASM modules work like regular JS libraries with optimized performance.

123. What is Edge SSR's main advantage over traditional SSR?

  • a) Lower latency via geographic distribution
  • b) Smaller bundle sizes
  • c) Automatic code splitting
  • d) No client-side JavaScript needed
Answer: A - Edge networks reduce TTFB by executing near users.

124. How to use React 19's useOptimistic hook?

  • a) Show temporary UI during async actions
  • b) Replace Redux state management
  • c) Prefetch components
  • d) Optimize image loading
Answer: A - Provides instant UI feedback before server confirmation.

125. What is the purpose of React Compiler?

  • a) Automatically memoize components/props
  • b) Convert JSX to vanilla JS
  • c) Replace Babel
  • d) Enable Python in React
Answer: A - Analyzes code to apply optimizations traditionally done manually with useMemo/useCallback.

126. How to implement a WebWorker with React?

  • a) comlink library + useEffect
  • b) Next.js API routes
  • c) React's built-in Worker API
  • d) Edge Functions
Answer: A - Comlink simplifies RPC-style communication with workers.

127. What is React Server Components' limitation?

  • a) No hooks/state/effects
  • b) Larger bundle size
  • c) Slower hydration
  • d) Requires GraphQL
Answer: A - RSCs are purely for rendering and data fetching.

128. How does React 19 improve hydration?

  • a) Progressive enhancement
  • b) Lazy element attachment
  • c) No hydration needed
  • d) Both A and B
Answer: D - Reduces jank by prioritizing visible content.

129. What is WASM's primary use case in React?

  • a) CPU-intensive tasks (image/video processing)
  • b) Replace React core
  • c) State management
  • d) CSS animations
Answer: A - Offloads heavy computations from main thread.

130. How to implement Edge SSR in Next.js?

  • a) export const runtime = 'edge'
  • b) Custom document component
  • c) React Server Components
  • d) All of the above
Answer: A - Next.js 13+ supports edge runtime per route.

131. What is React 19's Document Metadata feature?

  • a) Built-in title/meta tag management
  • b) Replace next/head
  • c) Automatic SEO optimization
  • d) Both A and B
Answer: D - Allows setting metadata anywhere in component tree.

132. How to optimize React for Core Web Vitals?

  • a) Code splitting + lazy loading
  • b) Image optimization
  • c) Selective hydration
  • d) All of the above
Answer: D - Targets LCP, FID, and CLS metrics.

133. What is the purpose of React's use hook?

  • a) Consume promises/context in components
  • b) Replace useState
  • c) Experimental WASM integration
  • d) All of the above
Answer: A - Simplifies working with async data (React Canary feature).

134. How does Edge SSR handle authentication?

  • a) Middleware with cookies
  • b) JWT in edge functions
  • c) Both A and B
  • d) No auth support
Answer: C - Requires stateless auth due to edge's distributed nature.

135. What is React 19's asset loading improvement?

  • a) Automatic image/styling dependency tracking
  • b) WASM bundle splitting
  • c) Replace Webpack
  • d) All of the above
Answer: A - Knows when assets are used/not used in components.

136. How to measure WebAssembly performance in React?

  • a) Performance.measure() API
  • b) React Profiler
  • c) Custom benchmarking
  • d) All of the above
Answer: D - Compare JS vs WASM execution times for specific tasks.

137. What is the limitation of Edge SSR?

  • a) Smaller runtime API surface
  • b) No Node.js modules
  • c) Cold starts
  • d) All of the above
Answer: D - Edge environments have compute/memory constraints.

138. How does React 19 optimize re-renders?

  • a) Automatic memoization
  • b) Compiler-generated optimization
  • c) Both A and B
  • d) No improvements
Answer: C - Reduces need for manual useMemo/useCallback.

139. What is the benefit of WASM threads in React?

  • a) Parallel computation
  • b) Shared memory
  • c) Both A and B
  • d) No React integration
Answer: C - Enables true multithreading for heavy tasks.

140. How to deploy Edge SSR on Vercel?

  • a) Automatic with next.config.js
  • b) Custom serverless function
  • c) Edge middleware
  • d) Both A and C
Answer: D - Next.js handles edge deployment configuration automatically.
« First 6 7 8 9 Last »
« Previous Page Next Page »

Learn Computer Skills with PCBooks

Master computer skills with PCBooks! Explore interactive tutorials, MCQ tests, and online exams for programming, web development, and IT fundamentals. Perfect for beginners and advanced learners.

Online MCQ Tests for Programming

Practice programming MCQ questions and improve your coding skills with our online quizzes. Whether you're learning Python, Java, or C programming, PCBooks has you covered.

Free Web Development Tutorials

Learn HTML, CSS, and JavaScript with our free web development tutorials. Test your knowledge with interactive quizzes and online exams.