Saturday, October 8, 2022

Use Wrapper to avoid empty div's for grouping

After using wrapper instead of div, grouping ignored wrapper tag. 


created wrapper for ignoring grouping div, (for performance increase)

wrapper in app.js<Wrapper>...</Wrapper>



2. type : use empty wrapper <>....</>


3.type if empty tags wrapper wont work use below 
<React.Fragment> ....</React.Fragment>

Type 4:  import Fragment in react: then add tag <Fragment></Fragment>

Note
With Type 2,3,4  no need of using type 1 wrapper creation, 
Type 2,3,4 are inbuild, 
Type 1 is manually created for understanding, how wrapper works.

No comments:

Post a Comment