{"id":18534823,"url":"https://github.com/atomicojs/example-next-js","last_synced_at":"2025-05-14T23:35:06.592Z","repository":{"id":44124132,"uuid":"511940170","full_name":"atomicojs/example-next-js","owner":"atomicojs","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-08T16:01:20.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T00:35:11.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"example-next-js-mocha.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atomicojs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-08T15:21:55.000Z","updated_at":"2022-07-08T16:02:02.000Z","dependencies_parsed_at":"2022-09-16T18:41:43.574Z","dependency_job_id":null,"html_url":"https://github.com/atomicojs/example-next-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicojs%2Fexample-next-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicojs%2Fexample-next-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicojs%2Fexample-next-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicojs%2Fexample-next-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomicojs","download_url":"https://codeload.github.com/atomicojs/example-next-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253207825,"owners_count":21871391,"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-06T19:17:10.319Z","updated_at":"2025-05-14T23:35:06.544Z","avatar_url":"https://github.com/atomicojs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How is it possible that Atomico supports Next.js SSR?\n\n[![twitter](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/twitter.svg)](https://twitter.com/atomicojs)\n[![discord](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/discord.svg)](https://discord.gg/7z3rNhmkNE)\n[![documentation](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/doc-1.svg)](https://atomico.gitbook.io/doc/)\n[![discord](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/doc.svg)](https://webcomponents.dev/create/atomico)\n\nAtomico uses webcomponents, but it is agnostic to the rendering system, thanks to the [@atomico/react](https://github.com/atomicojs/react) package, atomico is able to extend its use support to any platform that works with React, example Next.js.\n\n\u003e This example is introductory, to exemplify the use of @atomico/react manually, there is a second package @atomico/exprots that does all this automatically by distributing your component created with Atomico as a package 😉.\n\nThis 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).\n\n## what is different about Next.js to support Atomico webcomponents with SSR?\n\n**1. [pages/\\_app.jsx](./pages/_app.jsx)**\n\n```jsx\nimport \"@atomico/react/proxy\";\nimport \"../styles/globals.css\";\n\nfunction MyApp({ Component, pageProps }) {\n  return \u003cComponent {...pageProps} /\u003e;\n}\n\nexport default MyApp;\n```\n\n**2. [pages/index.jsx](./pages/index.jsx)**: here the magic happens.\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.\n\n[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.\n\nThe `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicojs%2Fexample-next-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomicojs%2Fexample-next-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicojs%2Fexample-next-js/lists"}