Join Shaun Wassell for an in-depth discussion in this video Adding an Upvote button, part of React: Creating and Hosting a Full-Stack Site.
But this interaction is still one-sided. … an upvote to a specific article. … a new file, and we'll call it UpvotesSection.js. … UpvotesSection, and for now it'll be empty. … And, as usual, we're going to want to export it. … Export default UpvotesSection. … So the first thing we're going to want to do … in our UpvotesSection is go to our article page component … and pull out this text that tells us how many times … an article has been upvoted. … We're going to cut that, … and we're going to paste it in our UpvotesSection. … Next we want to add a button, … and the text of this button will just say Add Upvote, … and finally we'll wrap the whole thing in a div. … purposes I'm going to use a div, and the id for this div … is going to be upvotes-section. … inside the div, … and now for actually upvoting our article, … the onClick method of this button is going to be … where the magic happens. … directly inside this method, … but instead of cluttering up … our UI elements here, let's define it up top. …
- 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.