Quick Contact


    React Fragment

    It is basic concept of React. Fragment helps to return multiple elements. Fragments let you group a list of children element. For writing different elements

    tag is used. If

    tag is replaced with fragment then it prevent extra node from added to the DOM. Example is given below-:

    		Import React from ‘react’
    		Function FragmentDemo() {
    		Return (
    		< React.Fragment>
    		     < h1>FragmentDemo < /h1>
    		      < p>....... < /p>
    		< /React.Fragment>
    		)
    		}
    		Export default FragmentDemo
    	

    As suppose a component table that renders HTML table and inside that table columns are rendered with another component called columns.

    		Class table extends react.Component {
    		Render() {
    		  Return (
    		< table>
    		< tr>
    		     < columns/>
    		< /tr>
    		< /table>
    		);
    		}
    		}
    		Class Columns extends react.Component {
    		 Render() {
    		Return (
    		< div>
    		< td>hii< /td>
    		< td>ducat< /td>
    		);
    		}
    		}
    	

     

    Apply now for Advanced React Js Course

    Copyright 1999- Ducat Creative, All rights reserved.

    Anda bisa mendapatkan server slot online resmi dan terpercaya tentu saja di sini. Sebagai salah satu provider yang menyediakan banyak pilihan permainan.