Skip to content

Commit 73eec93

Browse files
authored
Merge pull request #3637 from CodeHarborHub/restyled/dev-3
Restyle added ads on ebook section
2 parents c54de8a + b2b6953 commit 73eec93

File tree

5 files changed

+81
-63
lines changed

5 files changed

+81
-63
lines changed

courses/Next.Js/beginner-level/Introduction/Frameworks.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,62 @@ title: "Comparing Next.js with Other Frameworks"
44
sidebar_label: Next.js with Frameworks
55
sidebar_position: 2
66
description: "Comparing Next.js with Other Frameworks"
7-
tags: [courses,beginner-level,FramWorks,Introduction]
8-
---
9-
10-
## Comparing Next.js with Other Frameworks
7+
tags: [courses, beginner-level, FramWorks, Introduction]
8+
---
119

10+
## Comparing Next.js with Other Frameworks
1211

1312
### 1. Next.js vs. React
1413

15-
- **React**: A library for building user interfaces. It focuses on the view layer and requires additional libraries and tools for routing, state management, and server-side rendering.
16-
- **Next.js**: A framework built on top of React that provides out-of-the-box features like SSR, SSG, and file-based routing. It simplifies the setup and development process for React applications.
14+
- **React**: A library for building user interfaces. It focuses on the view layer and requires additional libraries and tools for routing, state management, and server-side rendering.
15+
- **Next.js**: A framework built on top of React that provides out-of-the-box features like SSR, SSG, and file-based routing. It simplifies the setup and development process for React applications.
1716

1817
### 2. Next.js vs. Angular
1918

20-
- **Angular**: A full-fledged framework developed by Google that includes a complete set of tools for building single-page applications. It uses TypeScript by default and has a more opinionated structure.
21-
- **Next.js**: Focuses on server-side rendering and static site generation for React applications. It is less opinionated than Angular and provides more flexibility in terms of tools and libraries.
19+
- **Angular**: A full-fledged framework developed by Google that includes a complete set of tools for building single-page applications. It uses TypeScript by default and has a more opinionated structure.
20+
- **Next.js**: Focuses on server-side rendering and static site generation for React applications. It is less opinionated than Angular and provides more flexibility in terms of tools and libraries.
2221

2322
### 3. Next.js vs. Vue
2423

25-
- **Vue**: A progressive framework for building user interfaces, similar to React in terms of component-based architecture.
26-
- **Nuxt.js**: A framework built on top of Vue that provides similar features to Next.js, including SSR and SSG.
27-
- **Next.js**: The React counterpart to Nuxt.js, providing SSR, SSG, and additional optimizations for React applications.
24+
- **Vue**: A progressive framework for building user interfaces, similar to React in terms of component-based architecture.
25+
- **Nuxt.js**: A framework built on top of Vue that provides similar features to Next.js, including SSR and SSG.
26+
- **Next.js**: The React counterpart to Nuxt.js, providing SSR, SSG, and additional optimizations for React applications.
2827

2928
### 4. Next.js vs. Gatsby
3029

31-
- **Gatsby**: A static site generator that uses React to build websites. It focuses on performance, SEO, and developer experience.
32-
- **Next.js**: Offers similar features to Gatsby, such as SSR and SSG, but with more flexibility and control over the development process. It is more suitable for applications that require server-side logic and dynamic data fetching.
30+
- **Gatsby**: A static site generator that uses React to build websites. It focuses on performance, SEO, and developer experience.
31+
- **Next.js**: Offers similar features to Gatsby, such as SSR and SSG, but with more flexibility and control over the development process. It is more suitable for applications that require server-side logic and dynamic data fetching.
3332

3433
### 5. Next.js vs. SvelteKit
3534

36-
- **SvelteKit**: A framework for building web applications using the Svelte framework. It focuses on simplicity, performance, and developer experience.
37-
- **Next.js**: Offers similar features to SvelteKit, such as SSR and SSG, but with a React-based approach. It provides a rich ecosystem of tools and libraries for building modern web applications.
35+
- **SvelteKit**: A framework for building web applications using the Svelte framework. It focuses on simplicity, performance, and developer experience.
36+
- **Next.js**: Offers similar features to SvelteKit, such as SSR and SSG, but with a React-based approach. It provides a rich ecosystem of tools and libraries for building modern web applications.
3837

3938
### 6. Next.js vs. Express (Node.js)
4039

41-
- **Express**: A minimalist web framework for Node.js that focuses on building server-side applications and APIs.
42-
- **Next.js**: A framework for building React applications with server-side rendering and static site generation. It provides additional features like automatic code splitting, API routes, and optimized performance.
40+
- **Express**: A minimalist web framework for Node.js that focuses on building server-side applications and APIs.
41+
- **Next.js**: A framework for building React applications with server-side rendering and static site generation. It provides additional features like automatic code splitting, API routes, and optimized performance.
4342

4443
### 7. Next.js vs. Nuxt.js
4544

46-
- **Nuxt.js**: A framework for building Vue applications with server-side rendering and static site generation.
47-
- **Next.js**: The React counterpart to Nuxt.js, providing similar features like SSR, SSG, and a rich ecosystem of tools and libraries for building modern web applications.
45+
- **Nuxt.js**: A framework for building Vue applications with server-side rendering and static site generation.
46+
- **Next.js**: The React counterpart to Nuxt.js, providing similar features like SSR, SSG, and a rich ecosystem of tools and libraries for building modern web applications.
4847

4948
### 8. Next.js vs. Create React App (CRA)
5049

51-
- **Create React App**: A tool for setting up React applications with a predefined configuration and build process.
52-
- **Next.js**: A framework that extends React with features like SSR, SSG, and API routes. It provides a more structured approach to building React applications with additional optimizations for performance and developer experience.
50+
- **Create React App**: A tool for setting up React applications with a predefined configuration and build process.
51+
- **Next.js**: A framework that extends React with features like SSR, SSG, and API routes. It provides a more structured approach to building React applications with additional optimizations for performance and developer experience.
5352

5453
### 9. Next.js vs. Blitz.js
5554

56-
- **Blitz.js**: A full-stack framework for building web applications with React and Prisma. It focuses on developer productivity and seamless integration of backend and frontend logic.
57-
- **Next.js**: Offers similar features to Blitz.js, such as SSR and SSG, but with a more flexible approach to building applications. It provides a broader range of tools and libraries for customizing and optimizing React applications.
55+
- **Blitz.js**: A full-stack framework for building web applications with React and Prisma. It focuses on developer productivity and seamless integration of backend and frontend logic.
56+
- **Next.js**: Offers similar features to Blitz.js, such as SSR and SSG, but with a more flexible approach to building applications. It provides a broader range of tools and libraries for customizing and optimizing React applications.
5857

5958
### 10. Next.js vs. Sapper
6059

61-
- **Sapper**: A framework for building web applications with Svelte that includes features like server-side rendering and routing.
62-
- **Next.js**: Offers similar features to Sapper, such as SSR and SSG, but with a React-based approach. It provides a more extensive set of tools and optimizations for building React applications.
60+
- **Sapper**: A framework for building web applications with Svelte that includes features like server-side rendering and routing.
61+
- **Next.js**: Offers similar features to Sapper, such as SSR and SSG, but with a React-based approach. It provides a more extensive set of tools and optimizations for building React applications.
6362

6463
### Conclusion
6564

66-
Next.js is a powerful framework for building React applications with server-side rendering, static site generation, and a rich ecosystem of tools and libraries. While there are other frameworks available for building web applications, Next.js stands out for its performance, developer experience, and flexibility in handling various use cases. Whether you are building a simple website, a full-fledged web application, or a complex enterprise solution, Next.js provides the features and optimizations needed to deliver high-quality applications efficiently.
65+
Next.js is a powerful framework for building React applications with server-side rendering, static site generation, and a rich ecosystem of tools and libraries. While there are other frameworks available for building web applications, Next.js stands out for its performance, developer experience, and flexibility in handling various use cases. Whether you are building a simple website, a full-fledged web application, or a complex enterprise solution, Next.js provides the features and optimizations needed to deliver high-quality applications efficiently.

courses/Next.Js/beginner-level/Introduction/introduction.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ title: Introduction to Next.js
44
sidebar_label: Introduction
55
sidebar_position: 1
66
description: Introduction to Next.js
7-
tags: [courses,beginner-level,FramWorks,Introduction]
8-
---
9-
7+
tags: [courses, beginner-level, FramWorks, Introduction]
8+
---
109

1110
## What is Next.js?
1211

@@ -29,7 +28,7 @@ Next.js offers several key features that make it a popular choice for building R
2928
6. **Built-in CSS and Sass Support**: Next.js has built-in support for importing CSS and Sass files, making it easy to style your applications.
3029

3130
7. **Developer Experience**: Features like fast refresh, which provides instantaneous feedback on edits without losing component state, make the development process more efficient and enjoyable.
32-
:::
31+
:::
3332

3433
## Why Learn Next.js?
3534

@@ -65,4 +64,4 @@ By learning Next.js, developers can leverage these features and benefits to crea
6564

6665
## Conclusion
6766

68-
Next.js is a powerful React framework that offers server-side rendering, static site generation, and a range of features to enhance the development process and application performance. By learning Next.js, developers can build fast, scalable, and SEO-friendly web applications with a seamless developer experience. Whether you are new to web development or looking to enhance your existing skills, Next.js provides a valuable toolkit for creating modern web applications that deliver exceptional user experiences.
67+
Next.js is a powerful React framework that offers server-side rendering, static site generation, and a range of features to enhance the development process and application performance. By learning Next.js, developers can build fast, scalable, and SEO-friendly web applications with a seamless developer experience. Whether you are new to web development or looking to enhance your existing skills, Next.js provides a valuable toolkit for creating modern web applications that deliver exceptional user experiences.

courses/Next.Js/beginner-level/Introduction/settingUp.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ title: "Setting Up the Development Environment"
44
sidebar_label: Setup
55
sidebar_position: 3
66
description: "Setting Up the Development Environment"
7-
tags: [courses,beginner-level,FramWorks,Introduction]
8-
---
9-
7+
tags: [courses, beginner-level, FramWorks, Introduction]
8+
---
9+
1010
To get started with Next.js, you'll need Node.js and npm (or yarn) installed on your system. Follow these steps to set up a Next.js development environment:
1111

1212
1. **Install Node.js**:
13+
1314
- Download and install Node.js from [nodejs.org](https://nodejs.org/).
1415

1516
2. **Create a New Next.js Application**:
17+
1618
- Open your terminal and run the following command to create a new Next.js project:
1719
```bash
1820
npx create-next-app@latest my-next-app
@@ -21,12 +23,14 @@ To get started with Next.js, you'll need Node.js and npm (or yarn) installed on
2123
```
2224

2325
3. **Navigate to the Project Directory**:
26+
2427
- Change to the project directory:
2528
```bash
2629
cd my-next-app
2730
```
2831

2932
4. **Start the Development Server**:
33+
3034
- Run the development server:
3135
```bash
3236
npm run dev
@@ -58,4 +62,4 @@ By following these steps, you can set up a development environment for building
5862
5963
## Additional Resources:
6064
61-
- [Next.js Documentation](https://nextjs.org/docs)
65+
- [Next.js Documentation](https://nextjs.org/docs)

courses/Next.Js/beginner-level/static-and-serverSide/concept.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@ title: "Concepts of static and server-side rendering"
44
sidebar_label: Concepts
55
sidebar_position: 2
66
description: "Concepts of static and server-side rendering"
7-
tags: [courses,beginner-level,FramWorks,Introduction]
7+
tags: [courses, beginner-level, FramWorks, Introduction]
88
---
9-
9+
1010
#### Implementing Static Generation (`getStaticProps`)
1111

1212
`getStaticProps` is a Next.js function that allows you to fetch data at build time to pre-render a page.
1313

1414
1. **Creating a Page with `getStaticProps`**:
15+
1516
```javascript
1617
// src/pages/posts/[id].js
17-
import { useRouter } from 'next/router';
18+
import { useRouter } from "next/router";
1819

1920
export async function getStaticProps({ params }) {
2021
// Fetch data for the post using the id from params
21-
const res = await fetch(`https://jsonplaceholder.typicode.com/posts/${params.id}`);
22+
const res = await fetch(
23+
`https://jsonplaceholder.typicode.com/posts/${params.id}`,
24+
);
2225
const post = await res.json();
2326

2427
return {
@@ -30,10 +33,10 @@ tags: [courses,beginner-level,FramWorks,Introduction]
3033

3134
export async function getStaticPaths() {
3235
// Specify dynamic routes to pre-render based on data
33-
const res = await fetch('https://jsonplaceholder.typicode.com/posts');
36+
const res = await fetch("https://jsonplaceholder.typicode.com/posts");
3437
const posts = await res.json();
3538

36-
const paths = posts.map(post => ({
39+
const paths = posts.map((post) => ({
3740
params: { id: post.id.toString() },
3841
}));
3942

@@ -68,11 +71,12 @@ tags: [courses,beginner-level,FramWorks,Introduction]
6871
`getServerSideProps` is a Next.js function that allows you to fetch data on each request to pre-render a page.
6972

7073
1. **Creating a Page with `getServerSideProps`**:
74+
7175
```javascript
7276
// src/pages/profile.js
7377
export async function getServerSideProps(context) {
7478
// Fetch data on each request
75-
const res = await fetch('https://jsonplaceholder.typicode.com/users/1');
79+
const res = await fetch("https://jsonplaceholder.typicode.com/users/1");
7680
const profile = await res.json();
7781

7882
return {
@@ -101,10 +105,13 @@ tags: [courses,beginner-level,FramWorks,Introduction]
101105
ISR allows you to update static pages after they have been built, without requiring a full rebuild of the site.
102106

103107
1. **Implementing ISR with `revalidate`**:
108+
104109
```javascript
105110
// src/pages/posts/[id].js
106111
export async function getStaticProps({ params }) {
107-
const res = await fetch(`https://jsonplaceholder.typicode.com/posts/${params.id}`);
112+
const res = await fetch(
113+
`https://jsonplaceholder.typicode.com/posts/${params.id}`,
114+
);
108115
const post = await res.json();
109116

110117
return {
@@ -116,10 +123,10 @@ ISR allows you to update static pages after they have been built, without requir
116123
}
117124

118125
export async function getStaticPaths() {
119-
const res = await fetch('https://jsonplaceholder.typicode.com/posts');
126+
const res = await fetch("https://jsonplaceholder.typicode.com/posts");
120127
const posts = await res.json();
121128

122-
const paths = posts.map(post => ({
129+
const paths = posts.map((post) => ({
123130
params: { id: post.id.toString() },
124131
}));
125132

@@ -150,4 +157,4 @@ ISR allows you to update static pages after they have been built, without requir
150157

151158
#### Conclusion
152159

153-
Next.js provides various methods for rendering pages, including static generation, server-side rendering, and incremental static regeneration. These features allow you to optimize performance and user experience by fetching data at build time or on each request.
160+
Next.js provides various methods for rendering pages, including static generation, server-side rendering, and incremental static regeneration. These features allow you to optimize performance and user experience by fetching data at build time or on each request.

0 commit comments

Comments
 (0)