Welcome back.
In the previous video, we are able to fix the key prop error.
So in this video, let's talk about what is called fragment tag.
So what is a fragment?
Well, let's use this component to demonstrate that.
So let's go to the app rather and the app instead of just returning this one, let's add our own.
It's a HTML element here.
So each one and let's say we're com.
We're calm and then we have some P tag here.
And let's see, this is what we call fragment.
So let's see onto the page.
Okay.
So what is the fragment?
Tag and react.
Fragment is a way to group a list of children without adding extra nodes to the dome.
So let's say that a component is returning multiple elements at once.
Normally, if you return more than one element from a component, it might be wrapped inside a parent
container or parent element, and that's what we are doing here.
So even though we don't need this particular element here, if you do that, so that is creating more
nodes into the DOM so we can remove this.
Dave Sorry, remove, we can remove it and write it as that.
So this is equally same as this, but instead we are not adding any nodes, any element or any nodes
to the DOM and this is called the same as before and that is it.
So the performance here is that it does not add extra nodes to the domain of which you don't want it.
So if you don't want to use a Dave to add some starting, we normally use what is called the fragment.