Currently Empty: £0.00
The React Framework for the Web
Used by some of the world’s largest companies, Next.js enables you to create full-stack web applications by extending the latest React features and integrating powerful Rust-based JavaScript tooling for the fastest builds.
In this course, You will learn all the latest features of Next.js like app directory, pages, data fetching in a new way.
You will learn these concepts in this course:
-
Client and Server Rendering
-
Nested Routing
-
Data Fetching
-
Built-in Optimization
-
Typescript support
-
API Routes
-
Middlewares
-
Deployment
-
CSS styling
-
Caching
-
Using database
One of the main benefits of Next. js is that it enables server-side rendering. This means the server can generate the HTML for a page and send it to the client, rather than the client generating the HTML using JavaScript. This can improve the performance and SEO of your app.
One of Next.js’s best features is file-based routing. Instead of dealing with complicated route settings in a program like react-router, routes can be specified using the directory project structure. By adding an entry point to the directory page, you can create a new path.
Next.js 13 includes updated file routing with the new directory. The optional app directory introduces a new layout structure as well as several new features and improvements.
The directory structure has undergone minor changes due to the new routing mechanism. Each path in the route has a dedicated directory with a page.js file that serves as the content entry point in Next.js 13.
What’s most exciting about the new version of Next.js is the expanded support for React server components. Server components let us run and render React components on the server side for faster delivery, a smaller JavaScript bundle, and less expensive client-side rendering.
In addition, depending on the kind of data required to generate a route, server components are automatically cached at build-time or runtime for added performance benefits.
Combining server and client components allows you to use server components for fast-loaded, non-interactive parts of your program while using client components for interaction, browser APIs, and other features.
When constructing client components for your Next.js application, you can designate them as such by using the ‘use client’; directive at the top of the file. However, if you utilize any third-party packages, you might need to create a client wrapper.
In addition, Next.js 13 introduces async components, a fresh approach to data collection for server-rendered components. When using async components, we can render systems using Promises using async & await.
Routing
Pages, Layout, and Navigation
-
4File based Routing
The new router works in a new directory named app. The app directory works alongside the pages directory to allow for incremental adoption. This allows you to opt some routes of your application into the new behavior while keeping other routes in the pages directory for previous behavior.
-
5Dynamic Route
When you don't know the exact segment names ahead of time and want to create routes from dynamic data, you can use Dynamic Segments that are filled in at request time or prerendered at build time.
A Dynamic Segment can be created by wrapping a folder’s name in square brackets: [folderName]. For example, [id] or [slug].
Dynamic Segments are passed as the params prop to layout, page, route, and generateMetadata functions.
-
6Route Groups
The hierarchy of the app folder maps directly to URL paths. However, it’s possible to break out of this pattern by creating a route group. Route groups can be used to:
Organize routes without affecting the URL structure.
Opting-in specific route segments into a layout.
Create multiple root layouts by splitting your application.
Server vs Client Component, Data Fetching
-
7Pages and Layout
A page is UI that is unique to a route. You can define pages by exporting a component from a page.js file. Use nested folders to define a route and a page.js file to make the route publicly accessible.
-
8Navigation using Link Component
The Next.js router uses server-centric routing with client-side navigation. It supports instant loading states and concurrent rendering. This means navigation maintains client-side state, avoids expensive re-renders, is interruptible, and doesn't cause race conditions.
There are two ways to navigate between routes:
<Link> Component
useRouter Hook
This page will go through how to use <Link>, useRouter(), and dive deeper into how navigation works.
-
9Programatic Navigation
The useRouter hook allows you to programmatically change routes inside Client Components.
To use useRouter, import it from next/navigation, and call the hook inside your Client Component:
-
10Dynamic segment
When you don't know the exact segment names ahead of time and want to create routes from dynamic data, you can use Dynamic Segments that are filled in at request time or prerendered at build time.
API Routes, Loading, Error Handling
-
11Server vs Client Component
Server and Client Components allow developers to build applications that span the server and client, combining the rich interactivity of client-side apps with the improved performance of traditional server rendering.
This page will go through the differences between Server and Client Components and how to use them in your Next.js application.
-
12Data Fetching
This new data fetching model is currently being developed by the React team. We recommend reading the support for promises React RFC which introduces async/await in Server Components and a new use() hook for Client Components.
While you can try it out, it is not yet stable. We'll keep these docs updated to reflect the latest developments.
Styling
-
13Create your first API Route
API routes should still be defined in the pages/api/* directory and not moved to the app directory.
Route Handlers are available on next@canary. This replaces API Routes from the pages directory.
Some use cases where an API route was used to keep access tokens secure when calling an external API from the client can now be done directly in Server Components.
-
14Access Dynamic Route Segment
-
15Loading
Next.js 13 introduced a new file convention, loading.js, to help you create meaningful Loading UI with React Suspense. With this convention, you can show an instant loading state from the server while the content of a route segment loads, the new content is automatically swapped in once rendering is complete.
-
16Streaming
To learn how Streaming works in React and Next.js, it's helpful to understand Server-Side Rendering (SSR) and its limitations.
With SSR, there's a series of steps that need to be completed before a user can see and interact with a page:
First, all data for a given page is fetched on the server.
The server then renders the HTML for the page.
The HTML, CSS, and JavaScript for the page are sent to the client.
A non-interactive user interface is shown using the generated HTML, and CSS.
Finally, React hydrates the user interface to make it interactive.
-
17Error Handling
The error.js file convention allows you to gracefully handle runtime errors in nested routes.
Automatically wrap a route segment and its nested children in a React Error Boundary.
Create error UI tailored to specific segments using the file-system hierarchy to adjust granularity.
Isolate errors to affected segments while keeping the rest of the app functional.
Add functionality to attempt to recover from an error without a full page reload.
Create error UI by adding an error.js file inside a route segment and exporting a React component:
[Unofficial Udemy Clone] - Project Setup
-
18Global Styling
bal styles can be imported into any layout, page, or component inside the app directory.
Good to know: This is different from the pages directory, where you can only import global styles inside the _app.js file.
-
19CSS Modules
-
20Installing Bootstrap with Next.js
You will learn how to install Bootstrap in Next.js v13
[Unofficial Udemy Clone] - Building Frontend
-
21Getting setup
In this video, you are going to install Next.js in your application. You will clone the repository from Github and run npm install
-
22Install Bootstrap and React Bootstrap in Next.js
In this video, you are going to learn how to use Bootstrap with Next.js v13. You will install bootstrap and react bootstrap
React-Bootstrap replaces the Bootstrap JavaScript. Each component has been built from scratch as a true React component, without unneeded dependencies like jQuery.
As one of the oldest React libraries, React-Bootstrap has evolved and grown alongside React, making it an excellent choice as your UI foundation.
[Unofficial Udemy Clone] - Building Backend
-
23Build Navigation
In this video, we are going to build the navbar using react bootstrap navbar component
-
24Design Home Page
You will add categories of courses on the home page. We will use Bootstrap Container, Row and Col component to build our home page
-
25Render courses against each Category
In this lesson, we are going to render all the courses against each category. We don’t have any course right now on the backend. We did not create backend yet. We will just render the dummy course against each category
-
26Create single course details page
Now our goal is to display the course title, description and the video. We are going to use vimeo for the video. You can place any vimeo video url or video id. I want you to create a new account at vimeo and upload a video. You need the id of your uploaded video.
-
27Add Learning Outcomes
Now our goal is to add what you will learn section in the course details page.
I will be using React ListGroupItem component to display the list of learning outcomes.
We have to use this LearningOutcomes component inside the course/[slug.tsx] file
-
28Add Course Content Section
Now we need to add course content section. I am going to use React Bootstrap Accordion component.
-
29Add to Cart Button
Now we need to add the Add to Cart button and price section in Coursedetails page. You need to update the second Col in the Row and add course pricing and button. I have also added the total number of students and course author.
Fetching data on the frontend
-
30Install Prisma
In this video, we are going to add Prisma ORM inside our existing Next.js application
-
31Create Course Model
In this video, we are going to create a new course model in the schema file. You will learn how to use migrate command. I will also teach you how to define the route to fetch all courses
-
32Create GET API endpoint to fetch all courses
Route Handlers allow you to create custom request handlers for a given route using the Web Request and Response APIs.
The following HTTP methods are supported: GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.
-
33Creating Schema Design
We will think about what type of models we need. You learn about how to design the schema for your application
-
34Creating Schema in Prisma
In this video, we are going to create Course model, Video model, Topic model, Section models in Prisma. You will learn how to migrate these models into tables
-
35Create Dynamic Route segment
You will learn how to create the dynamic route on the based on slug
-
36Fetch single course based on slug part 1
You will learn how to perform relational queries in Prisma
-
3707-Fetch single course based on slug part 2
Learn how to use include during queries
-
38Fetch courses based on Topic
A user can view all the courses on the topic. We need to create a backend API endpoint to fetch all the courses on the based on topic
How long do I have access to the course materials?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Can I take my courses with me wherever I go?
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
Stars 5
3
Stars 4
3
Stars 3
0
Stars 2
2
Stars 1
0