Fragments in react js

Overview of Fragments in react js : If you are writting elements in react js before the fragments you was need wrapper class / nested class / extra nodes to the DOM. But latest version 16.x in react component to return multiple elements. Fragments let you group a list of children without adding extra nodes to the DOM.

For example :

Short Syntax : This is a way to write the new syntax, So you can say shorter syntax and you can use for declaring fragments. It is as like empty tags:



Categories: React

Leave a Reply

Be the First to Comment!

Notify of
Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.