From the course: Building Full-Stack Apps with React and Spring
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Finalize list of contacts component
From the course: Building Full-Stack Apps with React and Spring
Finalize list of contacts component
- [Instructor] Now we'll finalize our listing by connecting to our server in our contact file. So the first thing we're going to do is import two files that we're going to create in the following video. So let's go ahead and do that while we're working on this specific file here. So we're going to create a file called SingleContact from SingleContact, so it's not there yet, and then we'll also import AddContacts, which is going to be our form that we'll create shortly to AddContacts. So we already have our state created here so we're good there. So what we need to do now is do a component did mount, which is basically the method that runs before it renders our component here. So what we're going to do is create that right away. So component did mount, and what this method is going to allow us is to fetch the data before we actually render our component here. So basically we'll have access to the data with the fetch method here. So basically we're fetching from our server. So if you…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Create contact listing component5m 14s
-
(Locked)
Add materialize to the project3m 30s
-
(Locked)
Finalize list of contacts component4m 23s
-
(Locked)
Create and structure your components5m 8s
-
(Locked)
Connect the add contact form to server5m 52s
-
(Locked)
Add server controller for CORS5m 24s
-
(Locked)
Finalize server controller for CORS6m 32s
-
(Locked)
-