Join Shaun Wassell for an in-depth discussion in this video Creating a 404 page in React, part of React: Creating and Hosting a Full-Stack Site.
we haven't taken care of yet. … we'd display a message that told us so. … we don't have any pages for, like this. … So the first thing we're going to do … and we'll call this file NotFoundPage.js … and then we'll call our component NotFoundPage … and this component's just going to display the text … 404 page not found, inside a heading tag, … 404 page not found. … And finally we want to export our component, … export default NotFoundPage. … is by creating another route inside our app component. … Route, and unlike our other routes, … When we don't give a route a path, … it will always match by default. … And for our component, we want to display our not found page, … let's import that up at the top here, … from ./pages/NotFoundPage. … we see that it's working correctly. … However, if we go to any of our existing pages, … is essentially, they display whatever component we give it, … if the URL matches the route's path, … And since we didn't give this route a path, … with another react router component called Switch. …
- 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.