What does “export default” do in JSX?

后端 未结 5 1739
心在旅途
心在旅途 2020-12-07 07:42

I want to ask what the last sentence means and does (export default HelloWorld;) but I can\'t find any tutorials about it.

// hello-world.jsx

import React f         


        
5条回答
  •  不知归路
    2020-12-07 08:09

    In Simple Words -

    The export statement is used when creating JavaScript modules to export functions, objects, or primitive values from the module so they can be used by other programs with the import statement.

    Here is a link to get clear understanding : MDN Web Docs

提交回复
热议问题