From the course: React for Web Designers

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Scaffold initial components

Scaffold initial components - React.js Tutorial

From the course: React for Web Designers

Scaffold initial components

- [Instructor] In this video, we're going to start scaffolding out the components we need to build up our Company Directory app. To recap, we need one big directory component to wrap everything. We'll have a filters component, a people component, which is going to contain person components. So we're going to need to work with four components. Let's start with the big one first, the company directory. Currently, we have pretty much nothing going on in our index.html file. So let's start working on the script to change that. I have my directory.js file open here. So the first thing I want to do is set up a place where these components can be rendered when they're finished. So just as we've seen before, we'll use ReactDOM.render. And we need our component here, which will be a Directory. This is just what we'll choose to call it this time. And then we need a place to put it. So we'll use document.getElementById. And we need to retrieve the right ID from our index.html file. Down here on…

Contents