react fragment
render() {
return (
<React.Fragment>
<ChildA />
<ChildB />
<ChildC />
</React.Fragment>
);
}
react fragment
render() {
return (
<React.Fragment>
<ChildA />
<ChildB />
<ChildC />
</React.Fragment>
);
}
how to use react fragment
//the same way you'd use any other element
//except that it doesn't support keys or attributes.
render() {
return (
<>
<p>Hello</p>
<p>World!</p>
</>
);
}
fragments in react
<table>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
</table>
Why do we use fragments in react?
Fragments let you group a list of children without adding extra nodes to the DOM.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us