Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes:-174 Migrate <a> Tags to React Router DOM #174 #176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sandeepshegane1
Copy link

@sandeepshegane1 sandeepshegane1 commented Jan 27, 2025

fixes #174

Summary

This pull request refactors the project by replacing traditional <a> tags with React Router DOM components for navigation. This change improves performance, user experience, and scalability by enabling seamless client-side navigation without full-page reloads.

Changes Made

  1. Replaced <a> Tags with React Router DOM:

    • Updated all <a> tags to use <Link> or <NavLink> components from React Router DOM.
    • Ensures in-app navigation works without triggering full-page reloads.
  2. Updated Routes and Configurations:

    • Defined routes in the application to handle navigation paths.
    • Added a fallback route for handling undefined paths.
  3. Revised Import Statements:

    • Adjusted imports to include Link or NavLink as required.
  4. Preserved Functionality:

    • Ensured all existing functionality and URL structures are preserved post-migration.

Reason for Change

Using <a> tags caused full-page reloads, resetting the application state and impacting performance. Migrating to React Router DOM improves user experience, maintains application state during navigation, and simplifies managing dynamic routes.

Testing

  1. Verified Navigation:

    • Checked that navigation links update the URL and display the correct page content without reloading.
  2. Browser History Integration:

    • Confirmed that the browser's back and forward buttons work seamlessly with the updated routing.
  3. Edge Case Handling:

    • Tested navigation for undefined paths and ensured the fallback route works properly.
  4. Performance Checks:

    • Ensured navigation is faster and avoids unnecessary page reloads.

@sandeepshegane1 sandeepshegane1 changed the title Refactor Navigation: Migrate <a> Tags to React Router DOM #174 fixes:-174 Migrate <a> Tags to React Router DOM #174 Jan 27, 2025
@sandeepshegane1
Copy link
Author

Hi sir @varunchitre15 @saisankargochhayat @heychirag @raghavpuri31

Awaiting your reviews and let me know if further improvement needed .
Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from <a> Tags to React Router DOM
1 participant