Join Shaun Wassell for an in-depth discussion in this video Adding comments functionality, part of React: Creating and Hosting a Full-Stack Site.
the next common feature that we'll want to implement … is add a new property to all the article objects … And next, let's create another route. … and then, of course, we'll have our callback … that we have the raw and JSON selected here, … for our add comment request to have two properties. … for now we'll just add a fake value in there, … and the second one will be the actual text of the comment, … we'll call this property text, … So now that we know what we want the body … will be found in req.body, so what we need to do … text, is equal to req.body. … just as in our upvote endpoint, we're going to have … And finally, we're going to send back a response, … with the correct endpoint and request body, … so we can simply send this request and see what we get back. … and send another request, … contains both comments, which is exactly what we want. … the front-end functionality yet. … there's a problem we have to solve. … You may have noticed that because all our article data … is stored inside our server code, …
- Creating the app component
- Using React-Router links
- Setting up an Express server
- Route parameters in Express
- Adding the comments functionality
- Installing and adding MongoDB to your project
- Rewriting the endpoints
- Adding React hooks
- Adding buttons and forms
- Pushing code to GitHub
- Running a full-stack app on AWS
Skill Level Intermediate
1. Creating a React Front End
2. Creating a Node Back End
3. Setting Up MongoDB
4. Connecting the Front and Back Ends
5. Hosting the Site
Next steps1m 17s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.