← React Intermediate Questions - Set 11 Q106
What is the difference between `React.Fragment` and div?
React Intermediate Questions - Set 11
Example
1
2
<><td>A</td><td>B</td></> // no wrapper
<div><td>A</td><td>B</td></div> // invalid inside <tr>
What to notice
- The fragment leaves the DOM untouched, so table and flex layouts stay correct.
← Back to the question list