Chapter quiz · Components & Props

Test what you learned.

8 questions on Components & Props. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Components & Props — Chapter Quiz

Eight questions on props, children, composition, and keys.

0/ 8
  1. Question 1
    1

    A child component can mutate its props.

  2. Question 2
    2

    How do you pass a number as a prop?

  3. Question 3
    3

    What does the children prop hold?

  4. Question 4
    4

    What does this render?

    function Box({ children }) {
      return <div className="box">{children}</div>;
    }
    
    <Box>Hi</Box>
    
  5. Question 5
    5

    Which key choice is best for a list of { id, name } items?

  6. Question 6
    6

    <div onClick={handleClick()}> calls handleClick on every render.

  7. Question 7
    7

    What does function Btn({ kind = "primary", ...rest }) { ... } do?

  8. Question 8
    8

    To forward arbitrary props to an inner element, use <button {._______}> (rest was destructured).

Pick an answer — instant feedback as you go.