{"_id":"@amazing-router/react","_rev":"4-ad045e5ab71571dcc04ba6e70a586a13","name":"@amazing-router/react","dist-tags":{"latest":"1.2.4"},"versions":{"1.1.0":{"name":"@amazing-router/react","version":"1.1.0","keywords":["react","router","amazing-router","file-system-routing"],"author":{"name":"AdelGann"},"license":"MIT","_id":"@amazing-router/react@1.1.0","maintainers":[{"name":"adelgann","email":"imadelg14@gmail.com"}],"dist":{"shasum":"5892b14c700e2eae7b6f60e7a3f8d0607e3f52af","tarball":"https://registry.npmjs.org/@amazing-router/react/-/react-1.1.0.tgz","fileCount":7,"integrity":"sha512-qpqW9rvHKCTX6YfmTLFMea0lF/d1ejkMeJ+55/N4jUiTNMerLmyFM3KCYJSmPa7E+3nbZPJzC6sB/Cl5Kpylrw==","signatures":[{"sig":"MEQCICnQfkw7n+fgUZ+SyEzfbxpsD00mNQ7+mj6nphWF08SKAiAs41KuKuWECLdEHp41ckkaTZVeEcVRbRVi2Hnv63jbQA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18447},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"4c1ed2e4c08f66397ec50fa504277be7fe7312e1","scripts":{"dev":"tsup src/index.ts --format cjs,esm --watch --dts --external react","lint":"eslint src","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --clean --external react","test:ui":"vitest"},"_npmUser":{"name":"adelgann","email":"imadelg14@gmail.com"},"_npmVersion":"11.12.1","description":"React adapter for Amazing Router Core using React Router under the hood","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@amazing-router/core":"^1.5.4"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","jsdom":"^29.0.1","react":"^19.0.0","vitest":"^4.1.2","react-dom":"^19.0.0","typescript":"^5.7.3","@types/react":"^19.0.0","react-router":"^7.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^6.0.1","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0","react-router":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react_1.1.0_1775067495569_0.09126863250878481","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@amazing-router/react","version":"1.2.0","keywords":["react","router","amazing-router","file-system-routing"],"author":{"name":"AdelGann"},"license":"MIT","_id":"@amazing-router/react@1.2.0","maintainers":[{"name":"adelgann","email":"imadelg14@gmail.com"}],"dist":{"shasum":"41e1d4ff0cfa6e873a42eade1bd5e84333e72fdb","tarball":"https://registry.npmjs.org/@amazing-router/react/-/react-1.2.0.tgz","fileCount":7,"integrity":"sha512-czhXXBuYIFGXpqkAMkJ0Iq5Ks1GA7GFxjAiUa+b29ragnlUBYo2/jFaE8GySb85mTA5vbPI/PKXUS9peaqZp5Q==","signatures":[{"sig":"MEUCIF9ox48lT+PkYhhoKGxhefcZYXAiUVFlqTka9vj5u2cgAiEAvCv0LbKfqDfJk6jeG3osWvh8gN/BZr7VzNb2YKme62I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19378},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"60b318647622ca6c8feb400fd2dbc439b42400e3","scripts":{"dev":"tsup src/index.ts --format cjs,esm --watch --dts --external react","lint":"eslint src","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --clean --external react","test:ui":"vitest"},"_npmUser":{"name":"adelgann","email":"imadelg14@gmail.com"},"_npmVersion":"10.9.4","description":"React adapter for Amazing Router Core using React Router under the hood","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@amazing-router/core":"^1.5.4"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","jsdom":"^29.0.1","react":"^19.0.0","vitest":"^4.1.2","react-dom":"^19.0.0","typescript":"^5.7.3","@types/react":"^19.0.0","react-router":"^7.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^6.0.1","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0","react-router":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react_1.2.0_1775089111975_0.7925644567015369","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@amazing-router/react","version":"1.2.2","keywords":["react","router","amazing-router","file-system-routing"],"author":{"name":"AdelGann"},"license":"MIT","_id":"@amazing-router/react@1.2.2","maintainers":[{"name":"adelgann","email":"imadelg14@gmail.com"}],"dist":{"shasum":"f90d9897745b1d6340d47a22ac75a0a22e1fd6e7","tarball":"https://registry.npmjs.org/@amazing-router/react/-/react-1.2.2.tgz","fileCount":7,"integrity":"sha512-GI11kdJGE3jXLfLyQEQPY6wrZOwF4GJebv1Sn7kdYsk+UgbwDAbAmvIdFpOK3ZRZcwBHXIlJfNGGhzeDkprFiw==","signatures":[{"sig":"MEQCIGjKNAkPDIuPsTki+gUgLLSw8VNGkE9K6SswEHQ9flIhAiBjzwghAVcL+KgYjsvJyk6sWs1mZYQtZQvS1EyIbU47cA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23975},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"4f0a5bef9e036ba28a961c9446b2da2915cd9274","scripts":{"dev":"tsup src/index.ts --format cjs,esm --watch --dts --external react","lint":"eslint src","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --clean --external react","test:ui":"vitest"},"_npmUser":{"name":"adelgann","email":"imadelg14@gmail.com"},"_npmVersion":"11.12.1","description":"React adapter for Amazing Router Core using React Router under the hood","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@amazing-router/core":"^1.5.4"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","jsdom":"^29.0.1","react":"^19.0.0","vitest":"^4.1.2","react-dom":"^19.0.0","typescript":"^5.7.3","@types/react":"^19.0.0","react-router":"^7.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^6.0.1","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0","react-router":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react_1.2.2_1777507476773_0.7236168701689447","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"@amazing-router/react","version":"1.2.4","description":"React adapter for Amazing Router Core using React Router under the hood","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean","dev":"tsup src/index.ts --format cjs,esm --watch --dts","lint":"eslint src","test":"vitest run","test:ui":"vitest"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0","react-router":"^7.0.0"},"dependencies":{"@amazing-router/core":"^1.5.4"},"devDependencies":{"@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^6.0.1","jsdom":"^29.0.1","react":"^19.0.0","react-dom":"^19.0.0","react-router":"^7.0.0","tsup":"^8.3.5","typescript":"^5.7.3","vitest":"^4.1.2"},"keywords":["react","router","amazing-router","file-system-routing"],"author":{"name":"AdelGann"},"license":"MIT","gitHead":"8078953e4339127d21013d8d070dbc91813673b9","_id":"@amazing-router/react@1.2.4","_nodeVersion":"24.11.1","_npmVersion":"11.12.1","dist":{"integrity":"sha512-klEKOJo8or6rffPE9OKkvN7i/88F9A5a4HhCBHGMUVHp4APiQdw4PNH42NfAJqeNNuWSsXuMGu1eUZPYWgrmVw==","shasum":"27e7886143f713fe7910e742ad670edbf7329e48","tarball":"https://registry.npmjs.org/@amazing-router/react/-/react-1.2.4.tgz","fileCount":7,"unpackedSize":22635,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCRB9SXdrwZ0HftYaZRid+Cq3pernuLJRJ5idHzrHPIFgIhAOjDoqeCR1kYlCaEidHZZQtvaFZ/zr3Bhc6g6gh7M9pr"}]},"_npmUser":{"name":"adelgann","email":"imadelg14@gmail.com"},"directories":{},"maintainers":[{"name":"adelgann","email":"imadelg14@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react_1.2.4_1777599994385_0.6347282778483525"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-01T18:18:15.458Z","modified":"2026-05-01T01:46:34.672Z","1.1.0":"2026-04-01T18:18:15.719Z","1.2.0":"2026-04-02T00:18:32.134Z","1.2.2":"2026-04-30T00:04:36.945Z","1.2.4":"2026-05-01T01:46:34.562Z"},"author":{"name":"AdelGann"},"license":"MIT","keywords":["react","router","amazing-router","file-system-routing"],"description":"React adapter for Amazing Router Core using React Router under the hood","maintainers":[{"name":"adelgann","email":"imadelg14@gmail.com"}],"readme":"# ⚛️ Amazing Router React\n\nThe official React adapter for **Amazing Router**. Seamlessly integrates file-system based routing into your React applications, powered by React Router v7 under the hood.\n\n[![npm version](https://img.shields.io/npm/v/@amazing-router/react.svg)](https://www.npmjs.com/package/@amazing-router/react)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## ✨ Why Amazing Router React?\n\nBring the power of Next.js-style file-system routing to your vanilla React SPA or Vite project.\n\n- 📁 **Zero Config Routing**: Your directory structure dictates your routes.\n- ⚡ **React Router v7**: Built on top of the industry standard router for React.\n- 🧩 **Layouts & Groups**: Support for nested `layout.tsx`, `page.tsx`, and route groups.\n- 🔌 **Ready to Use**: Just drop in the provider and let it handle the rest.\n\n## 📦 Installation\n\nInstall the React adapter alongside the core engine and React Router:\n\n```bash\nnpm install @amazing-router/react @amazing-router/core react-router\n# or\nyarn add @amazing-router/react @amazing-router/core react-router\n# or\npnpm add @amazing-router/react @amazing-router/core react-router\n```\n\n## 🚀 Quick Start\n\n1. **Setup the Core Plugin**: Follow the [Amazing Router Core](https://www.npmjs.com/package/@amazing-router/core) instructions to add the plugin to your Vite/Webpack config and initialize your project.\n\n2. **Mount the Provider**: In your main entry file (e.g., `src/main.tsx` or `src/index.tsx`), replace your root app component with the `<AmazingProvider />`.\n\n```tsx\nimport { StrictMode } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { AmazingProvider } from \"@amazing-router/react\";\nimport \"./index.css\";\n\ncreateRoot(document.getElementById(\"root\")!).render(\n  <StrictMode>\n    <AmazingProvider />\n  </StrictMode>\n);\n```\n\n## ⚙️ How It Works\n\nThe `@amazing-router/react` adapter automatically reads the route tree generated by `@amazing-router/core` and dynamically translates it into a native `react-router` configuration object. \n\n- **`page.tsx`** files are mapped to React Router route elements.\n- **`layout.tsx`** files act as layout wrappers utilizing React Router's `<Outlet />`.\n- Routes are dynamically processed to support lazy-loading and optimal chunking.\n\n## 🪝 Re-exports\n\nFor maximum convenience, `@amazing-router/react` re-exports everything from `react-router`. You can import all your routing utilities directly from the adapter:\n\n```tsx\nimport { Link, useNavigate, Outlet } from \"@amazing-router/react\";\n\nexport default function CustomLayout() {\n  const navigate = useNavigate();\n  \n  return (\n    <div>\n      <nav>\n        <Link to=\"/dashboard\">Dashboard</Link>\n      </nav>\n      <main>\n        <Outlet />\n      </main>\n    </div>\n  );\n}\n```\n\n## 📄 License\n\nMIT © AdelGann","readmeFilename":"README.md"}