{"_id":"@appaka/next-router-mock","_rev":"5-d2022bb4f8282078fe5fa4d8061de427","name":"@appaka/next-router-mock","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@appaka/next-router-mock","version":"0.0.1","keywords":["react","next","next.js","nextjs","router","mock","test","testing"],"author":"","license":"MIT","_id":"@appaka/next-router-mock@0.0.1","maintainers":[{"name":"javierperez","email":"javier.perez.m@gmail.com"}],"homepage":"https://github.com/scottrippey/next-router-mock#readme","bugs":{"url":"https://github.com/scottrippey/next-router-mock/issues"},"dist":{"shasum":"977bf4513dd86261a6daa0ad6d00a60759f9867f","tarball":"https://registry.npmjs.org/@appaka/next-router-mock/-/next-router-mock-0.0.1.tgz","fileCount":108,"integrity":"sha512-a1WCSVCcq6gJdR2yIupZBR2Z5/GIFmjllYLo+kYbJlcoreW9UhqQP74txLENypblG/0FeBGWxnCSQdzaESRZEQ==","signatures":[{"sig":"MEUCIQDLfurdE0FOTQGyMpfubTsirIIiPNpKtS7Aw7LcIDKpEQIgCifNG2KdkfREYVlJ6Lxa+thAKDEE1RAUf7dSIQaeEAE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154111},"main":"dist/index","types":"./dist/index.d.ts","gitHead":"1959201340514875d3d32c3fe1f4708a0d584e8f","scripts":{"docs":"doctoc README.md","lint":"prettier --list-different src","test":"jest","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf dist","checks":"npm run docs && npm run lint && npm run test && npm run build && npm run typecheck && npm run test:integration","release":"changeset publish","lint:fix":"prettier --write src","typecheck":"tsc --noEmit","prerelease":"npm run build","preversion":"npm run checks","test:watch":"jest --watch","build:watch":"npm run build -- --watch","test:exports":"cd test/test-exports && npm test","test:next-10":"cd test/next-10 && npm test","test:next-11":"cd test/next-11 && npm test","test:next-12":"cd test/next-12 && npm test","test:next-13":"cd test/next-13 && npm test","prepublishOnly":"npm run build","test:next-12.2":"cd test/next-12.2+ && npm test","test:next-13.5":"cd test/next-13.5 && npm test","test:example-app":"cd test/example-app && npm test","test:integration":"npm run build && npm run test:exports && npm run test:example-app && npm run test:next-10 && npm run test:next-11 && npm run test:next-12 && npm run test:next-12.2 && npm run test:next-12.latest && npm run test:next-13 && npm run test:next-13.5","test:integration:ci":"npm run test:integration:install && npm run test:integration","test:next-12.latest":"cd test/next-12.latest && npm test","test:integration:install":"(cd test/example-app && npm i); (cd test/next-10 && npm i); (cd test/next-11 && npm i); (cd test/next-12 && npm i); (cd test/next-12.2+ && npm i); (cd test/next-12.latest && npm i); (cd test/next-13 && npm i); (cd test/next-13.5 && npm i)"},"_npmUser":{"name":"javierperez","email":"javier.perez.m@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/scottrippey/next-router-mock.git","type":"git"},"_npmVersion":"10.2.4","description":"Mock implementation of the Next.js Router","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","next":"14.1.4","react":"18.2.0","doctoc":"2.2.1","rimraf":"5.0.5","history":"5.3.0","ts-jest":"29.1.2","prettier":"3.2.5","react-dom":"18.2.0","typescript":"5.4.3","@types/jest":"29.5.12","@changesets/cli":"2.27.1","react-test-renderer":"18.2.0","@testing-library/react":"14.2.2","jest-environment-jsdom":"29.7.0"},"peerDependencies":{"next":">=10.0.0","react":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next-router-mock_0.0.1_1711031103750_0.12983898873436717","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@appaka/next-router-mock","version":"0.0.2","keywords":["react","next","next.js","nextjs","router","mock","test","testing"],"author":"","license":"MIT","_id":"@appaka/next-router-mock@0.0.2","maintainers":[{"name":"javierperez","email":"javier.perez.m@gmail.com"}],"homepage":"https://github.com/scottrippey/next-router-mock#readme","bugs":{"url":"https://github.com/scottrippey/next-router-mock/issues"},"dist":{"shasum":"a06a7dfda2311557121d5438e486b09c22031070","tarball":"https://registry.npmjs.org/@appaka/next-router-mock/-/next-router-mock-0.0.2.tgz","fileCount":108,"integrity":"sha512-jm6sPAtRhn7V7HZP9Axub9WUvlfgxZLU9KWzfxePFFLVMX0yyXCPuj1jUYO7QzuMNehdVzO3KKbSlLGSwhkObA==","signatures":[{"sig":"MEUCIQCTUtRDJEyPv80fFfLZLQxerleXy2TcoNggewVVq0w+UQIgfHhXCbbc71iJCLfX2RJjUPzt7VGx6oovetH8ukqsO4w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154708},"main":"dist/index","types":"./dist/index.d.ts","gitHead":"13fc0554c406a164c2a0adf4c8a086081c7a87d4","scripts":{"docs":"doctoc README.md","lint":"prettier --list-different src","test":"jest","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf dist","checks":"npm run docs && npm run lint && npm run test && npm run build && npm run typecheck && npm run test:integration","release":"changeset publish","lint:fix":"prettier --write src","typecheck":"tsc --noEmit","prerelease":"npm run build","preversion":"npm run checks","test:watch":"jest --watch","build:watch":"npm run build -- --watch","test:exports":"cd test/test-exports && npm test","test:next-10":"cd test/next-10 && npm test","test:next-11":"cd test/next-11 && npm test","test:next-12":"cd test/next-12 && npm test","test:next-13":"cd test/next-13 && npm test","prepublishOnly":"npm run build","test:next-12.2":"cd test/next-12.2+ && npm test","test:next-13.5":"cd test/next-13.5 && npm test","test:example-app":"cd test/example-app && npm test","test:integration":"npm run build && npm run test:exports && npm run test:example-app && npm run test:next-10 && npm run test:next-11 && npm run test:next-12 && npm run test:next-12.2 && npm run test:next-12.latest && npm run test:next-13 && npm run test:next-13.5","test:integration:ci":"npm run test:integration:install && npm run test:integration","test:next-12.latest":"cd test/next-12.latest && npm test","test:integration:install":"(cd test/example-app && npm i); (cd test/next-10 && npm i); (cd test/next-11 && npm i); (cd test/next-12 && npm i); (cd test/next-12.2+ && npm i); (cd test/next-12.latest && npm i); (cd test/next-13 && npm i); (cd test/next-13.5 && npm i)"},"_npmUser":{"name":"javierperez","email":"javier.perez.m@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/scottrippey/next-router-mock.git","type":"git"},"_npmVersion":"10.2.4","description":"Mock implementation of the Next.js Router","directories":{},"_nodeVersion":"20.11.0","dependencies":{"history":"5.3.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","next":"14.1.4","react":"18.2.0","doctoc":"2.2.1","rimraf":"5.0.5","ts-jest":"29.1.2","prettier":"3.2.5","react-dom":"18.2.0","typescript":"5.4.3","@types/jest":"29.5.12","@changesets/cli":"2.27.1","react-test-renderer":"18.2.0","@testing-library/react":"14.2.2","jest-environment-jsdom":"29.7.0"},"peerDependencies":{"next":">=10.0.0","react":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next-router-mock_0.0.2_1711104184822_0.8605157699116246","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@appaka/next-router-mock","version":"0.0.3","keywords":["react","next","next.js","nextjs","router","mock","test","testing"],"author":"","license":"MIT","_id":"@appaka/next-router-mock@0.0.3","maintainers":[{"name":"javierperez","email":"javier.perez.m@gmail.com"}],"homepage":"https://github.com/scottrippey/next-router-mock#readme","bugs":{"url":"https://github.com/scottrippey/next-router-mock/issues"},"dist":{"shasum":"a31bb60e16b2c575013e0c933105bdc72763cf52","tarball":"https://registry.npmjs.org/@appaka/next-router-mock/-/next-router-mock-0.0.3.tgz","fileCount":108,"integrity":"sha512-/KGxl9iIrwYGKpLihMovQy787UQhCkEPrsr2bQvVetxMlQlB6rtij5aG/waWdDbX40rfH74AiZsTRvf0thFgdA==","signatures":[{"sig":"MEYCIQDY2FelqhjbmDRdEr3bOldpbd2GIfVsV+KBh1gir4wwOgIhAJ3s1AOCuwgB1DstyKoAoixXtwygoUmByUF0fIapYQ5+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155909},"main":"dist/index","types":"./dist/index.d.ts","gitHead":"2a8fd29ae37aba60a814d4e39781dc8bc087d7ef","scripts":{"docs":"doctoc README.md","lint":"prettier --list-different src","test":"jest","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf dist","checks":"npm run docs && npm run lint && npm run test && npm run build && npm run typecheck && npm run test:integration","release":"changeset publish","lint:fix":"prettier --write src","typecheck":"tsc --noEmit","prerelease":"npm run build","preversion":"npm run checks","test:watch":"jest --watch","build:watch":"npm run build -- --watch","test:exports":"cd test/test-exports && npm test","test:next-10":"cd test/next-10 && npm test","test:next-11":"cd test/next-11 && npm test","test:next-12":"cd test/next-12 && npm test","test:next-13":"cd test/next-13 && npm test","prepublishOnly":"npm run build","test:next-12.2":"cd test/next-12.2+ && npm test","test:next-13.5":"cd test/next-13.5 && npm test","test:example-app":"cd test/example-app && npm test","test:integration":"npm run build && npm run test:exports && npm run test:example-app && npm run test:next-10 && npm run test:next-11 && npm run test:next-12 && npm run test:next-12.2 && npm run test:next-12.latest && npm run test:next-13 && npm run test:next-13.5","test:integration:ci":"npm run test:integration:install && npm run test:integration","test:next-12.latest":"cd test/next-12.latest && npm test","test:integration:install":"(cd test/example-app && npm i); (cd test/next-10 && npm i); (cd test/next-11 && npm i); (cd test/next-12 && npm i); (cd test/next-12.2+ && npm i); (cd test/next-12.latest && npm i); (cd test/next-13 && npm i); (cd test/next-13.5 && npm i)"},"_npmUser":{"name":"javierperez","email":"javier.perez.m@gmail.com"},"repository":{"url":"git+https://github.com/scottrippey/next-router-mock.git","type":"git"},"_npmVersion":"10.2.4","description":"Mock implementation of the Next.js Router","directories":{},"_nodeVersion":"20.11.0","dependencies":{"history":"5.3.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","next":"14.1.4","react":"18.2.0","doctoc":"2.2.1","rimraf":"5.0.5","ts-jest":"29.1.2","prettier":"3.2.5","react-dom":"18.2.0","typescript":"5.4.3","@types/jest":"29.5.12","@changesets/cli":"2.27.1","react-test-renderer":"18.2.0","@testing-library/react":"14.2.2","jest-environment-jsdom":"29.7.0"},"peerDependencies":{"next":">=10.0.0","react":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next-router-mock_0.0.3_1712663135997_0.15190924203162415","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2024-03-21T14:25:03.668Z","modified":"2025-04-09T14:39:11.126Z","0.0.1":"2024-03-21T14:25:03.949Z","0.0.2":"2024-03-22T10:43:05.004Z","0.0.3":"2024-04-09T11:45:36.140Z"},"bugs":{"url":"https://github.com/scottrippey/next-router-mock/issues"},"license":"MIT","homepage":"https://github.com/scottrippey/next-router-mock#readme","keywords":["react","next","next.js","nextjs","router","mock","test","testing"],"repository":{"url":"git+https://github.com/scottrippey/next-router-mock.git","type":"git"},"description":"Mock implementation of the Next.js Router","maintainers":[{"name":"javierperez","email":"javier.perez.m@gmail.com"}],"readme":"# `@appaka/next-router-mock`\n\nFork from:\n1. https://github.com/scottrippey/next-router-mock\n1. https://github.com/ergofriend/next-router-mock/tree/add-history-support\n\n\nAn implementation of the Next.js Router that keeps the state of the \"URL\" in memory (does not read or write to the\naddress bar).  Useful in **tests** and **Storybook**. \nInspired by [`react-router > MemoryRouter`](https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/api/MemoryRouter.md).\n\nTested with NextJS v13, v12, v11, and v10.\n\nInstall via NPM: `npm install --save-dev @appaka/next-router-mock`\n\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Usage with Jest](#usage-with-jest)\n    - [Jest Configuration](#jest-configuration)\n    - [Jest Example](#jest-example)\n- [Usage with Storybook](#usage-with-storybook)\n    - [Storybook Configuration](#storybook-configuration)\n    - [Storybook Example](#storybook-example)\n- [Compatibility with `next/link`](#compatibility-with-nextlink)\n    - [Example: `next/link` with React Testing Library](#example-nextlink-with-react-testing-library)\n    - [Example: `next/link` with Enzyme](#example-nextlink-with-enzyme)\n    - [Example: `next/link` with Storybook](#example-nextlink-with-storybook)\n- [Dynamic Routes](#dynamic-routes)\n- [Sync vs Async](#sync-vs-async)\n- [Supported Features](#supported-features)\n  - [Not yet supported](#not-yet-supported)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# Usage with Jest\n\n### Jest Configuration\nFor unit tests, the `@appaka/next-router-mock` module can be used as a drop-in replacement for `next/router`:\n\n```js\njest.mock('next/router', () => require('@appaka/next-router-mock'));\n```\n\nYou can do this once per spec file, or you can [do this globally using `setupFilesAfterEnv`](https://jestjs.io/docs/configuration/#setupfilesafterenv-array).\n\n### Jest Example\n\nIn your tests, use the router from `@appaka/next-router-mock` to set the current URL and to make assertions.\n\n```jsx\nimport { useRouter } from 'next/router';\nimport { render, screen, fireEvent } from '@testing-library/react';\nimport mockRouter from '@appaka/next-router-mock';\n\njest.mock('next/router', () => jest.requireActual('@appaka/next-router-mock'))\n\nconst ExampleComponent = ({ href = '' }) => {\n  const router = useRouter();\n  return (\n    <button onClick={() => router.push(href)}>\n      The current route is: \"{router.asPath}\"\n    </button>\n  );\n}\n\ndescribe('@appaka/next-router-mock', () => {\n  it('mocks the useRouter hook', () => {\n    // Set the initial url:\n    mockRouter.push(\"/initial-path\");\n    \n    // Render the component:\n    render(<ExampleComponent href=\"/foo?bar=baz\" />);\n    expect(screen.getByRole('button')).toHaveText(\n      'The current route is: \"/initial-path\"'\n    );\n\n    // Click the button:\n    fireEvent.click(screen.getByRole('button'));\n    \n    // Ensure the router was updated:\n    expect(mockRouter).toMatchObject({ \n      asPath: \"/foo?bar=baz\",\n      pathname: \"/foo\",\n      query: { bar: \"baz\" },\n    });\n  });\n});\n```\n\n\n# Usage with Storybook\n\n### Storybook Configuration\nGlobally enable `@appaka/next-router-mock` by adding the following webpack alias to your Storybook configuration.\n\nIn `.storybook/main.js` add:\n```js\nmodule.exports = {\n  webpackFinal: async (config, { configType }) => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      \"next/router\": \"@appaka/next-router-mock\",\n    };\n    return config;\n  },\n};\n```\n\nThis ensures that all your components that use `useRouter` will work in Storybook.  If you also need to test `next/link`, please see the section [Example: **`next/link` with Storybook**](#example-nextlink-with-storybook).\n\n### Storybook Example\n\nIn your individual stories, you might want to mock the current URL (eg. for testing an \"ActiveLink\" component), or you might want to log `push/replace` actions.  You can do this by wrapping your stories with the `<MemoryRouterProvider>` component.  \n\n```jsx\n// ActiveLink.story.jsx\nimport { action } from '@storybook/addon-actions';\nimport { MemoryRouterProvider } \n  from '@appaka/next-router-mock/MemoryRouterProvider/next-13';\nimport { ActiveLink } from './active-link';\n\nexport const ExampleStory = () => (\n  <MemoryRouterProvider url=\"/active\" onPush={action(\"router.push\")}>\n    <ActiveLink href=\"/example\">Not Active</ActiveLink>\n    <ActiveLink href=\"/active\">Active</ActiveLink>\n  </MemoryRouterProvider>\n);\n```\n\n> Be sure to import from **a matching Next.js version**: \n> ```\n> import { MemoryRouterProvider } \n>   from '@appaka/next-router-mock/MemoryRouterProvider/next-13.5';\n> ```\n> Choose from `next-13.5`, `next-13`, `next-12`, or `next-11`.\n\nThe `MemoryRouterProvider` has the following optional properties:\n\n- `url` (`string` or `object`) sets the current route's URL\n- `async` enables async mode, if necessary (see \"Sync vs Async\" for details)\n- Events:\n  - `onPush(url, { shallow })`\n  - `onReplace(url, { shallow })`\n  - `onRouteChangeStart(url, { shallow })`\n  - `onRouteChangeComplete(url, { shallow })`\n\n\n# Mock `next/navigation`\n\n```tsx\nimport mockRouter from '@appaka/next-router-mock'\n\njest.mock('next/navigation', () => ({\n  ...jest.requireActual('next/navigation'),\n\tuseRouter: mockRouter,\n\tuseParams: () => {\n\t\tconst { query } = mockRouter\n\t\treturn query\n\t},\n\tuseSearchParams: () => {\n\t\tconst { query } = mockRouter\n\t\tconst search = new URLSearchParams()\n\n\t\tObject.entries(query).forEach(([key, value]) => {\n\t\t\tsearch.append(key, `${value}`)\n\t\t})\n\n\t\treturn search\n\t},\n}))\n```\n\n# Compatibility with `next/link`\n\nTo use `@appaka/next-router-mock` with `next/link`, you must use a `<MemoryRouterProvider>` to wrap the test component.\n\n### Example: `next/link` with React Testing Library\n\nWhen rendering, simply supply the option `{ wrapper: MemoryRouterProvider }`\n\n```jsx\nimport { render } from '@testing-library/react';\nimport NextLink from 'next/link';\n\nimport mockRouter from '@appaka/next-router-mock';\nimport { MemoryRouterProvider } from '@appaka/next-router-mock/MemoryRouterProvider';\n\nit('NextLink can be rendered', () => {\n  render(\n    <NextLink href=\"/example\">Example Link</NextLink>, \n    { wrapper: MemoryRouterProvider }\n  );\n  fireEvent.click(screen.getByText('Example Link'));\n  expect(mockRouter.asPath).toEqual('/example')\n});\n```\n\n### Example: `next/link` with Enzyme\n\nWhen rendering, simply supply the option `{ wrapperComponent: MemoryRouterProvider }`\n\n```jsx\nimport { shallow } from 'enzyme';\nimport NextLink from 'next/link';\n\nimport mockRouter from '@appaka/next-router-mock';\nimport { MemoryRouterProvider } from '@appaka/next-router-mock/MemoryRouterProvider';\n\nit('NextLink can be rendered', () => {\n  const wrapper = shallow(\n    <NextLink href=\"/example\">Example Link</NextLink>, \n    { wrapperComponent: MemoryRouterProvider }\n  );\n  \n  wrapper.find('a').simulate('click');\n  \n  expect(mockRouter.asPath).to.equal('/example')\n});\n```\n\n### Example: `next/link` with Storybook\n\nIn Storybook, you must wrap your component with the `<MemoryRouterProvider>` component (with optional `url` set).\n\n```jsx\n// example.story.jsx\nimport NextLink from 'next/link';\nimport { action } from '@storybook/addon-actions';\n\nimport { MemoryRouterProvider } from '@appaka/next-router-mock/MemoryRouterProvider/next-13.5';\n\nexport const ExampleStory = () => (\n  <MemoryRouterProvider url=\"/initial\">\n    <NextLink href=\"/example\">Example Link</NextLink>\n  </MemoryRouterProvider>\n);\n```\n\nThis can be done inline (as above).  \nIt can also be implemented as a `decorator`, which can be per-Story, per-Component, or Global (see [Storybook Decorators Documentation](https://storybook.js.org/docs/react/writing-stories/decorators) for details).  \nGlobal example:\n\n```\n// .storybook/preview.js\nimport { MemoryRouterProvider } from '@appaka/next-router-mock/MemoryRouterProvider';\n\nexport const decorators = [\n  (Story) => <MemoryRouterProvider><Story /></MemoryRouterProvider>\n]; \n```\n\n\n# Dynamic Routes\n\nBy default, `@appaka/next-router-mock` does not know about your dynamic routes (eg. files like `/pages/[id].js`).\nTo test code that uses dynamic routes, you must add the routes manually, like so:\n\n```typescript\nimport mockRouter from \"@appaka/next-router-mock\";\nimport { createDynamicRouteParser } from \"@appaka/next-router-mock/dynamic-routes\";\n\nmockRouter.useParser(createDynamicRouteParser([\n  // These paths should match those found in the `/pages` folder:\n  \"/[id]\",\n  \"/static/path\",\n  \"/[dynamic]/path\",\n  \"/[...catchAll]/path\"\n]));\n\n// Example test:\nit('should parse dynamic routes', () => {\n  mockRouter.push('/FOO');\n  expect(mockRouter).toMatchObject({\n    pathname: '/[id]',\n    query: { id: 'FOO' }\n  });\n})\n```\n\n# Sync vs Async\n\nBy default, `@appaka/next-router-mock` handles route changes synchronously. This is convenient for testing, and works for most\nuse-cases.  \nHowever, Next normally handles route changes asynchronously, and in certain cases you might actually rely on that\nbehavior. If that's the case, you can use `@appaka/next-router-mock/async`. Tests will need to account for the async behavior\ntoo; for example:\n\n```jsx\nit('next/link can be tested too', async () => {\n  render(<NextLink href=\"/example?foo=bar\"><a>Example Link</a></NextLink>);\n  fireEvent.click(screen.getByText('Example Link'));\n  await waitFor(() => {\n    expect(singletonRouter).toMatchObject({\n      asPath: '/example?foo=bar',\n      pathname: '/example',\n      query: { foo: 'bar' },\n    });\n  });\n});\n```\n\n# Supported Features\n\n- `useRouter()`\n- `withRouter(Component)`\n- `router.push(url, as?, options?)`\n- `router.replace(url, as?, options?)`\n- `router.back()`\n- `router.route`\n- `router.pathname`\n- `router.asPath`\n- `router.query`\n- Works with `next/link` (see Jest notes)\n- `router.events` supports:\n  - `routeChangeStart(url, { shallow })`\n  - `routeChangeComplete(url, { shallow })`\n  - `hashChangeStart(url, { shallow })`\n  - `hashChangeComplete(url, { shallow })`\n\n## Not yet supported\n\nPRs welcome!  \nThese fields just have default values; these methods do nothing.\n\n- `router.isReady`\n- `router.basePath`\n- `router.isFallback`\n- `router.isLocaleDomain`\n- `router.locale`\n- `router.locales`\n- `router.defaultLocale`\n- `router.domainLocales`\n- `router.prefetch()`\n- `router.beforePopState(cb)`\n- `router.reload()`\n- `router.events` not implemented:\n  - `routeChangeError`\n  - `beforeHistoryChange`\n\n","readmeFilename":"README.md"}