https://github.com/dfrho/nextjs-getstaticprops
⌛ Next.js ISR site using getStaticProps
https://github.com/dfrho/nextjs-getstaticprops
incremental-static-regeneration nextjs reactjs server-side-rendering
Last synced: 2 months ago
JSON representation
⌛ Next.js ISR site using getStaticProps
- Host: GitHub
- URL: https://github.com/dfrho/nextjs-getstaticprops
- Owner: dfrho
- Created: 2023-02-28T19:14:57.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T18:20:30.000Z (about 2 years ago)
- Last Synced: 2025-01-23T01:13:33.095Z (4 months ago)
- Topics: incremental-static-regeneration, nextjs, reactjs, server-side-rendering
- Language: CSS
- Homepage: https://eclectic-zabaione-3ea2da.netlify.app/
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# getStaticProps Example Next.js Component
This is the companion code base for this blog post, [Understanding ISR in Next.js](https://www.espressocode.tech/blog/isg-nextjs). We are using `getStaticProps` to get data before the page is rendered (SSR) to populate the component's props.Using ISR, the pre-generated HTML is cached on the server and served to subsequent requests. When the cache expires, Next.js re-generates the page in the background and updates the cache. This allows for faster response times and a more dynamic user experience without sacrificing the benefits of server-side rendering.
So, while ISR is a form of static site generation, it still uses server-side rendering to generate the initial HTML and therefore can be considered a form of SSR.
[Deployed on Netlify](https://eclectic-zabaione-3ea2da.netlify.app/)
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
```Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.