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

Upgrade React and react-router-dom, Refactor Navigation to use useNavigate() hook #1487

Closed
wants to merge 8 commits into from

Conversation

BhanuPrakash2047
Copy link

@BhanuPrakash2047 BhanuPrakash2047 commented Jan 31, 2025

This pull request addresses the following updates and improvements:

Performance Improvement:

Replaced the deprecated window.href.location with a more efficient navigation solution, improving the overall performance of the application.

React and react-router-dom Upgrade:

Upgraded the React version to the latest stable release to ensure compatibility with newer features and performance improvements.
Upgraded the react-router-dom version to align with the latest version, which includes breaking changes.

Refactor Routes for Compatibility:

Due to the deprecation of the old routing system, I’ve updated the routing configuration to work with the useNavigate() hook, which is now the preferred method for navigation in the latest version of react-router-dom.
This change improves routing consistency and makes the application more future-proof by adopting the latest best practices in routing.

While I initially planned to replace window.href.location, I encountered additional issues related to version upgrades and deprecated syntax. I worked through these challenges by seeking guidance and making necessary updates across multiple parts of the codebase.

This PR significantly improves the app's performance, maintains compatibility with the latest versions, and ensures it is using best practices for routing.

@BhanuPrakash2047 BhanuPrakash2047 changed the title Issue Resolved By Using useNavigate() Hook Upgrade React and react-router-dom, Refactor Navigation to use useNavigate() hook Jan 31, 2025
@mozzy11
Copy link
Collaborator

mozzy11 commented Feb 3, 2025

Thanks @BhanuPrakash2047 .
Can you see the CI build failure ??

@BhanuPrakash2047
Copy link
Author

Yes, I noticed version conflicts causing the build failure.i will fix the issues

@adityadeshlahre
Copy link
Contributor

hey @BhanuPrakash2047 after upgrading react package in repo(17->18)! are you facing any local build issue ?? { npm run build } is working fine ?? please check once and let us know

@BhanuPrakash2047
Copy link
Author

i am facing some issues while building it.

@BhanuPrakash2047 BhanuPrakash2047 closed this by deleting the head repository Feb 8, 2025
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.

3 participants