1. Which React Hook is used to add **state** in a functional component?
    a. useState
    b. useEffect
    c. useContext
    d. useReducer
    Answer: a. useState (useState is the built-in React Hook that lets you store and update local state in functional components.)  
  2. What does React’s “virtual DOM” do?
    a. It replaces the real DOM completely.
    b. It allows React to update only parts of the real DOM that changed.
    c. It stores user data on the server.
    d. It styles components.
    **Answer: b. It allows React to update only parts of the real DOM that changed. (**The virtual DOM compares previous and current UI states and updates only the changed elements for better performance.)  
  3. Which of the following is NOT required for this project?
    a. Node.js (for npm)
    b. A code editor
    c. A paid API key
    d. A web browser
    Answer: c. A paid API key (JokeAPI is free to use and does not require any authentication or payment.)  
  4. What is the main purpose of the Button component in our app?
    a. Fetch and display the joke.
    b. Hold the state for the joke.
    c. Render the button and trigger fetching the joke when clicked.
    d. Style the joke text.
    Answer: c. Render the button and trigger fetching the joke when clicked. (The Button component is responsible for rendering the UI button and handling the click event to fetch a new joke.)  
  5. How do we ensure the React app doesn’t reload the page when updating jokes?
    a. We must manually refresh the page.
    b. React’s state updates re-render only part of the UI, avoiding full reload.
    c. We use a backend server to reload data.
    d. It is not possible; the page always reloads.
    Answer: b. React’s state updates re-render only part of the UI, avoiding full reload. (React updates the component state using hooks like useState, allowing dynamic content changes without refreshing the page.)