React JS Quiz
HomeBlogPrivacy PolicyContact UsInterview QuestionsNewTutorialsBuy me a coffee
  1. Home
  2. /Quizzes
  3. /React apis
  4. /Fragment Quiz

Fragment Quiz

Test your knowledge of React Fragment, including shorthand syntax, grouping elements, keys, DOM output, lists, and common caveats.

20 questions · free · answers explained

Start the quiz
Advertisement

All questions in this quiz

  1. What is the main purpose of React Fragment?
  2. Which syntax is the common shorthand for Fragment?
  3. When should you use the explicit Fragment syntax instead of the shorthand?
  4. What does Fragment add to the resulting DOM?
  5. Why can Fragment be better than a wrapper div in some layouts?
  6. Which import is needed for explicit Fragment syntax?
  7. What is a common use for keyed Fragments?
  8. Can the shorthand Fragment syntax receive a key prop?
  9. Which situation is a good fit for Fragment?
  10. Does Fragment change the behavior of child components by itself?
  11. Why is Fragment useful in table markup?
  12. Which statement about Fragment and CSS is accurate?
  13. What should you use if you need a real wrapper for styling or layout?
  14. Can Fragment contain text nodes as well as components?
  15. Which prop can stable explicit Fragments commonly receive?
  16. What is the result of replacing a wrapper div with Fragment?
  17. What is a limitation of Fragment shorthand?
  18. Which JSX return is valid because of Fragment shorthand?
  19. Does Fragment help avoid unnecessary semantic markup?
  20. What is the practical rule for Fragment?

Prefer to read first? React interview questions with written answers.

Support the developer