Self review: Creating and importing components - React Basic

Self review: Creating and importing components - React Basic

  1. True or False: In React, you can never move a component to a separate file.

    • True

    • False

  2. True or False: You can omit the import keyword when importing one component into another in React.

    • True

    • False

  3. The code that follows is the first line of the App.js file. What does this line do? import Sidebar from "./Sidebar.js";

    • It imports a Sidebar component from the Sidebar.js file, which is located in the same folder as the App.js file.

    • It imports a Sidebar component from the Sidebar folder into the App.js file.

    • It imports a Sidebar component into the Sidebar folder, and then this entire folder is imported into the App.js file.