3. Fragments Flashcards
1
Q
What is a requirement when creating components that constitute multiple elements?
A
The elements must be wrapped within a parent element.
2
Q
What is a fragment?
A
It is a special type of component that contains multiple elements but are not wrapped within a parent element.
3
Q
How do you create fragments?
A
function componentName() { return <> jsxElements >; }