{"id":21905220,"url":"https://github.com/shrivastava-26/react_router","last_synced_at":"2026-05-09T01:07:17.799Z","repository":{"id":257921539,"uuid":"873163089","full_name":"shrivastava-26/react_router","owner":"shrivastava-26","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-11T13:10:01.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T07:28:33.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/shrivastava-26.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":"2024-10-15T17:49:14.000Z","updated_at":"2024-11-11T13:10:04.000Z","dependencies_parsed_at":"2024-11-28T16:42:57.073Z","dependency_job_id":null,"html_url":"https://github.com/shrivastava-26/react_router","commit_stats":null,"previous_names":["shrivastava-26/react_router"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shrivastava-26%2Freact_router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shrivastava-26%2Freact_router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shrivastava-26%2Freact_router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shrivastava-26%2Freact_router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shrivastava-26","download_url":"https://codeload.github.com/shrivastava-26/react_router/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918710,"owners_count":20531686,"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-28T16:31:50.722Z","updated_at":"2026-05-09T01:07:12.768Z","avatar_url":"https://github.com/shrivastava-26.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧑‍💻 React Router Practice\n\nThis repository contains my practice projects for learning and implementing routing concepts in **React.js** using **React Router**.\n\n## Features\n\n- **React Router DOM**: Learn how to use `react-router-dom` for client-side routing.\n- **Basic Routing**: Implement basic navigation between pages.\n- **Nested Routes**: Understand how to structure routes with child components.\n- **Dynamic Routes**: Use dynamic routing to create parameterized URLs.\n- **Programmatic Navigation**: Learn how to navigate programmatically using React Router hooks.\n- **404 Pages**: Handle unknown routes by creating custom \"Not Found\" pages.\n\n## Tech Stack\n\n- **React.js**: JavaScript library for building user interfaces.\n- **React Router DOM**: Standard routing library for React.\n- **JavaScript (ES6)**: Modern JavaScript features like hooks, arrow functions, and destructuring.\n\n## Project Structure\n\n    ├── public\n    │   └── index.html\n    ├── src\n    │   ├── components\n    │   │   ├── Home.js\n    │   │   ├── About.js\n    │   │   └── NotFound.js\n    │   ├── App.js\n    │   ├── index.js\n    │   ├── routes\n    │   │   ├── MainRoutes.js\n    │   └── styles\n    │       └── App.css\n    └── package.json\n\nGetting Started\nPrerequisites\nBefore you begin, ensure you have the following installed:\n\nNode.js and npm (or yarn)\nA code editor like VSCode\nInstallation\nClone the repository:\n\n\n    git clone https://github.com/yourusername/react-router-practice.git\n    cd react-router-practice\n    Install dependencies:\n    \n    \n    npm install\n    Start the development server:\n    \n    \n    npm start\n    This will start the development server at http://localhost:3000/.\n\n## Available Routes\n**Home Page (/):** The landing page of the app.\n\n**About Page (/about):** A simple page that provides information about the app.\n\n**Dynamic Route Example (/user/:id):** Dynamic routing for user details.\n\n**404 Not Found (*):** Catch-all route for handling unknown paths.\n\n## Concepts Covered\n-Basic Routing: Set up routes using \u003cRoute\u003e and \u003cSwitch\u003e (or \u003cRoutes\u003e in newer versions).\n\n-Nested Routing: Add routes inside components for deeper navigation.\n\n-Route Parameters: Capture dynamic values from the URL and pass them as props.\n\nProgrammatic Navigation: Use useHistory or useNavigate to navigate programmatically.\n\nProtected Routes: Implement simple authentication to protect certain routes.\n\n\n## Learnings\nHow to install and use react-router-dom.\nHow to manage state with URL parameters.\nHow to redirect or navigate programmatically.\nHow to handle routes that do not exist in the app.\nResources\nReact Router Documentation\nReact Documentation\nHappy coding! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshrivastava-26%2Freact_router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshrivastava-26%2Freact_router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshrivastava-26%2Freact_router/lists"}