Importing questions into the App component

Because the questions exported from the QuestionData.js file are named export, we have to use a different method to import the named export components. Unlike the default export, we have to use {} while importing the named export. This is shown in the following code snippet:

// default import

import ComponentName from "./Component/ComponentName"

//  named import

import {ComponentName} from "./Component/ComponentName"

As a result, the following code sample demonstrates how we import the questions:

Get hands-on with 1200+ tech skills courses.