DEV Community

FLO
FLO

Posted on

Importing...

One of my favorite things to learn on React is importing. What is importing? Let me explain to you in simple terms.

Image description

You may create a page and render it but if it is not imported, then your computer wouldn't know what you are trying to say.

Let's say I have an App.js as my main page. But I also created another component called NavTitle.js. If I want to add all my work from NavTitle.js to App.js, then I must import.
Next, you are going to add where in the file NavTitle.js is located.
Example: import { NavTitle } from './NavTitle.js';

__Think of import as someone who is the life of the party that you just have to bring with you everywhere. _
_

Top comments (0)