{"id":15546671,"url":"https://github.com/joulev/nextjs13-appdir-router-events","last_synced_at":"2025-02-28T23:33:39.746Z","repository":{"id":103342470,"uuid":"565423181","full_name":"joulev/nextjs13-appdir-router-events","owner":"joulev","description":"A Next.js 13 application with appDir and onStart/onComplete router events","archived":false,"fork":false,"pushed_at":"2023-08-01T07:12:52.000Z","size":74,"stargazers_count":105,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T18:38:26.922Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nextjs13-router-events.vercel.app","language":"TypeScript","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/joulev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-13T11:16:43.000Z","updated_at":"2025-01-06T07:59:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"1278c28c-999d-4b90-997a-84d63e50e999","html_url":"https://github.com/joulev/nextjs13-appdir-router-events","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/joulev%2Fnextjs13-appdir-router-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joulev%2Fnextjs13-appdir-router-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joulev%2Fnextjs13-appdir-router-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joulev%2Fnextjs13-appdir-router-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joulev","download_url":"https://codeload.github.com/joulev/nextjs13-appdir-router-events/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241275918,"owners_count":19937422,"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-10-02T13:03:18.144Z","updated_at":"2025-02-28T23:33:39.739Z","avatar_url":"https://github.com/joulev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"An example Next.js 13 application with [the `app` directory](https://nextjs.org/docs/app/building-your-application/routing) enabled, with a mock (?) of the former router events `onStart` and `onComplete`.\n\nWhen you navigate between routes, [`NProgress`](https://ricostacruz.com/nprogress) methods will be fired accordingly. This also works for SSR pages: the progress bar will appear instantly on route change, and will only disappear after the data fetch is completed. Or at least that's how it appears to be.\n\n## How to use\n\n- Copy the content of `lib/router-events`.\n- Change the events in `lib/router-events/events.ts` to whatever you need.\n- Add `\u003cHandleOnComplete /\u003e` from `lib/router-events` to your root layout\n- Wherever you use `useRouter`, change the import statement to import the hook from `lib/router-events`.\n- Wherever you use `\u003cLink\u003e`, change the import statement to import the component from `lib/router-events`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoulev%2Fnextjs13-appdir-router-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoulev%2Fnextjs13-appdir-router-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoulev%2Fnextjs13-appdir-router-events/lists"}