What is Named Export in Modules of ReactJS?
Named export means export a signal variable or export with name the particular code have to render with index.js and do not create render in and component just.
![]() |
| Named Export in React Export with Variable Name | IndianTechnoEra |
Firstly create a component with initial Capital latter name like App1.js then import react module.
After that define your variable and create the element whit your required specified web page format
createElement takes three attributes as follow
createElement('h1',{id:'myid'},'Heading text');
attributes Here like 'h1' here can nay tag of html what you have to use
second will be id or class id can be use as used above but if we have to give class then we need to write as follow
createElement('h1',{className:'myclass'},'Heading text');
After render the class will be show as normal as html class but to use or define in Pure React give with className for class defining
Example 1: Named Export in Modules of ReactJS
App1.js // inline or by name export variable without render into index with render
.png)