Chapter quiz · React Basics & JSX

Test what you learned.

8 questions on React Basics & JSX. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

React Basics & JSX — Chapter Quiz

Eight questions on JSX, components, and rendering.

0/ 8
  1. Question 1
    1

    Why does a function component's name need to start with a capital letter?

  2. Question 2
    2

    A function component can return multiple top-level JSX elements without a wrapper.

  3. Question 3
    3

    Which is the right way to write a "class" attribute in JSX?

  4. Question 4
    4

    What does this JSX produce?

    function App() {
      const n = 5;
      return <p>{n + 1}</p>;
    }
    
  5. Question 5
    5

    What does createRoot(...).render(<App />) do?

  6. Question 6
    6

    In React 19, the style prop takes a CSS string like in HTML.

  7. Question 7
    7

    What is <StrictMode>?

  8. Question 8
    8

    To group elements without adding a wrapper div, use a _________.

Pick an answer — instant feedback as you go.