From the course: Building a Website with Laravel, React.js, and Inertia
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Creating website navigation - Laravel Tutorial
From the course: Building a Website with Laravel, React.js, and Inertia
Creating website navigation
- [Instructor] In the previous lesson, we created a home and about pages, but we won't be able to see these pages in the browser just yet because the website is being served from the App.jsx file, and we need to update this file first. Let's add a simple navigation to navigate between pages and finally see them in the browser. To create a navigation, we will need to install a library called react-router-dom. Let's run npm install react-router-dom in the terminal. Once that is done, let's see the upload.jsx file and delete everything that we don't need. We won't need the React and Vite logos, so let's delete the imports. We won't even need to use state in this file, so let's delete it too, and actually let's delete everything in the body of the component between the fragments. We will need to create a navigation component that we will include in this file. Let's create a directory called components, and in there, navigation.jsx. This component will be responsible for rendering the…
Contents
-
-
-
-
React and Laravel setup3m 32s
-
(Locked)
Creating the Home and About pages1m 52s
-
(Locked)
Creating website navigation3m 24s
-
(Locked)
Displaying posts on a website2m 10s
-
(Locked)
Refactoring to components1m 52s
-
(Locked)
Fetching posts from Laravel API2m 22s
-
(Locked)
Creating a new post3m 43s
-
(Locked)
Updating a post2m 40s
-
(Locked)
Deleting a post1m 42s
-
(Locked)
Challenge: Show individual post page56s
-
(Locked)
Solution: Show individual post page2m 4s
-
-
-