{"id":20513508,"url":"https://github.com/microwebstacks/nextjs-examples","last_synced_at":"2025-12-02T20:02:19.988Z","repository":{"id":162853163,"uuid":"606376489","full_name":"MicroWebStacks/nextjs-examples","owner":"MicroWebStacks","description":"a sample set of basic patterns for nextjs evaluation and benchmarking","archived":false,"fork":false,"pushed_at":"2023-02-26T10:37:41.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T14:22:12.174Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MicroWebStacks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-25T09:55:11.000Z","updated_at":"2023-02-25T11:19:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9e3f576-a642-4e11-b402-d618ae548f71","html_url":"https://github.com/MicroWebStacks/nextjs-examples","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.125,"last_synced_commit":"a93b1b842ca14d994c6bc2c300b95149a12fbe54"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroWebStacks%2Fnextjs-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroWebStacks%2Fnextjs-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroWebStacks%2Fnextjs-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroWebStacks%2Fnextjs-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MicroWebStacks","download_url":"https://codeload.github.com/MicroWebStacks/nextjs-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242117717,"owners_count":20074438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T21:11:32.183Z","updated_at":"2025-12-02T20:02:14.949Z","avatar_url":"https://github.com/MicroWebStacks.png","language":"CSS","readme":"# nextjs-examples\na sample set of basic patterns for nextjs evaluation and benchmarking\n\n* cloudflare redirections reload : https://github.com/cloudflare/next-on-pages/issues/70\n\n# 01_basics\n\n* Nextjs no longer allows full page refresh transitions : https://nextjs.org/docs/messages/no-html-link-for-pages\n* Next executes page 2 get static props even if the page is not called, a sort of prefetch\n* build requires to disable images optimization `images.unoptimized: true` in `next.config.js`\n* export in `out` in addition to `next start`, does not run with vs code live server but runs with\n    ```cmd\n    python3 -m http.server 8000 --directory out\n    ```\n* `getStaticProps` is fetching the data on build time, but then result in needless refetch of the resulting json structure on every client page load. If that is an issue, it is necessary to fall back on client side load and caching. json Data is even loaded two times once on hover prefetch and then on Link click\n\n## vercel deployment\n* https://next-examples-basics.vercel.app/\n\n## lifecycle log\n* during build\n```log\nHello from home page body\nHello from page2 body\nHello from page2 getStaticProps 'on build time'\nHello from home page function\nHello from page2 function\n```\n* in the browser on home load\n```log\nHello from home page body\nHello from home page function\n```\n* on page 2 link hover\n```log\nHello from page2 body\n```\n* on click page 2 load\n```log\nHello from page 2 function\n```\n\n# 02_streaming-app\n\n* using the new beta feature app directory\n* nexted layout\n* `React Server Components` by default\n\nhttps://beta.nextjs.org/docs\nhttps://app-dir.vercel.app/\nhttps://nextjs.org/docs/advanced-features/react-18/streaming\nhttps://nextjs.org/docs/advanced-features/react-18/server-components\nhttps://beta.nextjs.org/docs/upgrade-guide\n\n## lifecycle log\n* build\n```log\nHello from page2 body\nHello from page2 body\nHello from home page function\nHello from page2 function\nHello from home page function\nHello from page2 function\n```\n* on fetching all pages : No log output, neither on the server nor on the browser\n# 03_ssr-counter\n\nshared global var demo. reload the page to increment the counter. All pages share the same counter\n\n* using `getServerSideProps()` to execute code on server side\n* same page code executes twice one on server, once on client, except `getServerSideProps()` is ignored on client and so are ignored all of its related imports\n\n## vercel deployment\n* https://next-ssr-counter.vercel.app/\n\n# 04_server-cookie-counter\n\nWork In Progress\n\n* using `src/app`\n* using `cookies()` `next/headers` but only has get, set not yet available. https://beta.nextjs.org/docs/api-reference/cookies#good-to-know\n\n# More Nextjs examples\n\n## Next MDX ToC\nremote mdx with in memory rehype plugins for generation of ToC. Using React components inside MDX\n\n* https://github.com/MicroWebStacks/next_mdx_toc\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrowebstacks%2Fnextjs-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrowebstacks%2Fnextjs-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrowebstacks%2Fnextjs-examples/lists"}