From the course: React with Styled Components

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Importing and exporting

Importing and exporting

- [Instructor] So now, let's really familiarize ourselves with the typical structure of a React project. So inside your project folder, mine is called my app, you find, of course, all of the files and directories, and this src source folder is where the action really happens. So this houses all of your source code, and I've made a folder called components, and all of my components for the challenges, examples, and solutions live here, and each one serves a specific role in my application. So let's move forward and create a simple component and explore the art of exporting. So in my src folder, under examples, I've, obviously, already got a lot going on here, but I'm going to create a JavaScript file called Button, so Button.js. So let's define the Button component. So const Button =, and we've got the arrow function, curly braces, return. Already, we've done this a few times now, and then, of course, I want to export…

Contents