React JS Quiz
Home
Blog
Privacy Policy
Contact Us
Fragment Quiz
Which JSX return is valid because of Fragment shorthand?
Report this question
<><h1>Title</h1><p>Body</p></>
Show Explanation
The shorthand Fragment wraps adjacent JSX nodes so the component returns one React element.
<h1>Title</h1><p>Body</p>
return h1 and p without JSX
<StrictMode key={id}>
Next Question (18/20)