From the course: Building Full-Stack Apps with React and Spring

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Create and structure your components

Create and structure your components

From the course: Building Full-Stack Apps with React and Spring

Start my 1-month free trial

Create and structure your components

- [Instructor] Now, we'll finalize our single contact file, and then get started on the form leveraging Materialize. So the first thing we're going to do is create a new file inside of our components. So let's go ahead, in that folder, create a new file, which we'll call Single Contact dot js. And you want to make sure that you have the same syntax as what you've written here, Single Contact with a capital C. So if that's the case, then we can continue. Now, what we're going to do first is import React, and then in this one, we're going to do a stateless component. Because we don't need to do all the methods that we typically do in a statefull component. So, let's go ahead and create first the functional component. Then we need to pass the item argument that we passed in our list here. So remember we passed an item argument. We need to use it here, like so. Then we'll export it. So now let's move on to Materialize's…

Contents