React Portals, Fragments, and StrictMode Quiz
Three drills on three small but tested React features: portals (with their event bubbling quirk), fragments, and what StrictMode does in development.
Question Bank
Medium
JavaScript
3 questions
quiz
react
interview-prep
js-dom
296 views
8
What does <Fragment> (or <>...</>) solve, and when must you use the long form <Fragment key={...}> instead of the shorthand?
Render a <Modal> into a DOM node outside the parent (e.g., document.getElementById('modal-root')). Explain the portal event bubbling quirk: where does a click inside the modal propagate to?
What changes when you wrap an app in <StrictMode> in a React 18 dev build? Pick the three concrete behaviors and explain why each one exists.
