https://github.com/raian-shahrear/restapi-nextjs
Practicing Next JS with TailwindCSS and daisyUI
https://github.com/raian-shahrear/restapi-nextjs
Last synced: about 1 month ago
JSON representation
Practicing Next JS with TailwindCSS and daisyUI
- Host: GitHub
- URL: https://github.com/raian-shahrear/restapi-nextjs
- Owner: raian-shahrear
- Created: 2023-01-05T16:35:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T18:09:31.000Z (over 2 years ago)
- Last Synced: 2025-02-06T19:48:07.649Z (3 months ago)
- Language: JavaScript
- Homepage: https://restapi-nextjs-explore.vercel.app
- Size: 2.64 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Exploring Next.js
## Live-site: [restapi-nextjs-explore.vercel.app](https://restapi-nextjs-explore.vercel.app/)
## What is learned/implemented so far:
#### 1. Next.js is a framework of React.js which is created by Vercel.
#### 2. It provides default routing, built-in CSS, Server Side Rendering (SSR), TypeScript support as well as all other react dependencies and features.
#### 3. It is better for SEO because of SSR feature and component like that includes & tags.
#### 4. SSG vs SSR: SSG (Static Site Generation) helps to pre-render a page at compile time, which means a user won't have to wait for loading the page whereas SSR (Server Side Rendering) helps to pre-render a page on the server which is then loaded as per client request and also makes the load speed faster. For data fetching, there are 3 different functions in Next.js which are only used in the Page: `getStaticProps`, `getStaticPaths` and `getServerSideProps`.
#### 5. For using default routing,
i) To create a JS-file inside a folder of the Page and for nested page, create a new folder inside the folder.
ii) To make a dynamic page, create a JS-file with squire brackets inside a folder of the Page, such as [dPage].js
#### 6. Page and Component both are used in Next.js
#### 7. Next.js app can be easily deployed to the Vercel.