React Fundamentals: Components, Hooks & State Management

20 QuestionsBeginnerPublished:

React Fundamentals: Components, Hooks & State Management

Up to 20 questions, shuffled on every run

Quiz Configuration
Enterto start

Welcome to the React Fundamentals Quiz! This quiz will test your knowledge of core React concepts, including components, JSX, hooks, state management, props, and event handling. Whether you’re new to React or looking to solidify your understanding of the basics, this quiz is designed to challenge you and help you master the fundamentals of building modern interactive UIs with React. Good luck!

Answer key and explanations20 questions

The quiz above draws 20 questions at random from these 31, so a second attempt will not be the same run. Everything in the pool is listed here.

  1. What is JSX?

    AnswerA syntax extension that allows writing HTML-like code within JavaScript

  2. What is a React component?

    AnswerA reusable JavaScript function or class that returns a JSX structure

  3. What is a functional component vs. class component?

    AnswerFunctional components use hooks; class components use lifecycle methods

  4. What are props in React?

    AnswerRead-only data passed from a parent component down to a child component

  5. What is React state?

    AnswerInternal data managed by a component that triggers updates when changed

  6. What is useState hook?

    AnswerA hook used to add and manage local state within functional components

  7. What is useEffect hook?

    AnswerA hook used for handling side effects like data fetching or DOM updates

  8. What is the dependency array in useEffect?

    AnswerA list of values that determines when the effect should re-run its logic

  9. What is event handling in React?

    AnswerThe process of attaching functions to UI events like onClick or onChange

  10. What is conditional rendering in React?

    AnswerDisplaying specific JSX based on logic using ternary or logical operators

  11. What is list rendering in React?

    AnswerGenerating multiple UI elements from an array using the .map() method

  12. What are keys in React lists?

    AnswerUnique identifiers that help React track and update specific list items

  13. What is the virtual DOM in React?

    AnswerAn in-memory representation of the DOM used to calculate efficient updates

  14. What is lifting state up?

    AnswerMoving shared state to a common parent component to sync sibling data

  15. What are controlled components?

    AnswerForm elements whose values are managed and updated by React state

  16. What is React Context?

    AnswerAn API for sharing state across the component tree without prop drilling

  17. What is component composition?

    AnswerDesigning UIs by combining multiple smaller components into a larger unit

  18. What is React lazy loading / code splitting?

    AnswerAsynchronously loading components only when they are needed by the user

  19. What is React Fragment?

    AnswerA tool for grouping multiple elements without adding extra nodes to the DOM

  20. What is React StrictMode?

    AnswerA development tool that highlights potential problems in an application

  21. What is the React developer tools?

    AnswerA browser extension for inspecting the component tree and tracking state

  22. What is React reconciliation?

    AnswerThe algorithm React uses to diff the virtual DOM and update the real DOM

  23. What is the key difference between React and vanilla JavaScript?

    AnswerReact is declarative (UI-focused) while vanilla JS is imperative (DOM-focused)

  24. What is useCallback hook?

    AnswerA hook that memoizes functions to prevent unnecessary child re-renders

  25. What is useMemo hook?

    AnswerA hook that memoizes expensive calculations to avoid repeating them

  26. What is useRef hook?

    AnswerA hook for creating persistent references that do not trigger re-renders

  27. What are custom hooks?

    AnswerFunctions that combine built-in hooks to share logic between components

  28. What is React.memo?

    AnswerA higher-order component that prevents re-rendering if props are unchanged

  29. What are PropTypes?

    AnswerA library for checking the data types of props during the app runtime

  30. What is an Error Boundary?

    AnswerA class component that catches JavaScript errors in its child components

  31. What is the purpose of React Suspense?

    AnswerA component that shows a fallback UI while waiting for content to load

Was this useful?

You might also enjoy

Check out some of our other posts on similar topics

Vue.js Fundamentals: Reactive Components & Templates

Vue.js Fundamentals: Reactive Components & Templates

Welcome to the Vue.js Basics Quiz! Vue.js is a progressive JavaScript framework for building user interfaces. Whether you're creating a simple interactive widget or a complex single-page application,

Astro: Building Fast Web Experiences

Astro: Building Fast Web Experiences

Welcome to the Astro Fundamentals Quiz! Test your knowledge of Astro's core concepts: island architecture, server components, client directives, content collections, integrations, layouts, routing, dy

React Native: Cross-Platform Mobile Development

React Native: Cross-Platform Mobile Development

Welcome to the React Native Mobile Development Quiz! Test your knowledge of building native iOS and Android apps using React Native. This quiz covers key concepts like components, navigation, state ma

Flutter: Cross-Platform Mobile Development

Flutter: Cross-Platform Mobile Development

Welcome to the Flutter Mobile Development quiz! Test your knowledge of Flutter, Google's cross-platform UI toolkit for building natively compiled applications for mobile, web, and desktop from a singl

Advanced Frontend Patterns: State Management & Performance

Advanced Frontend Patterns: State Management & Performance

Master advanced frontend architecture: state management (Redux, Zustand), performance optimization, code splitting, lazy loading, and responsive design patterns.

JavaScript: Language Fundamentals & Modern Features

JavaScript: Language Fundamentals & Modern Features

Welcome to the JavaScript Basics Quiz! This quiz is designed to test your understanding of fundamental JavaScript concepts, syntax, and modern programming best practices. Each question is multiple-cho

6 related posts