<React.Fragment>
is an empty tag that does not create extradiv
s inside a component<></>
is same as<React.Fragment></React.Fragment>
- We cannot pass props to React Fragment.
- It is a component, which is exported by
React
.
<></>
can also be written as<React.Fragment></React.Fragment>
.Fragment>
- There can be only one parent inside a component.
- JSX only have one parent
- It is a representation of DOM.
- React reconciliation is a diff algorithm that React uses to find the differences between the trees to improve the speed of application.