How to import and export components using React and ES6?

Posted by Prem Tiwari | Updated on | ReactJS interview

How to import and export components using React and ES6?

You should use default for exporting the components:

With the export specifier, the MyProfile is going to be the member and exported to this module and the same can be imported without mentioning the name in other components.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers