devFind
devFind copied to clipboard
feat: Implement react-router-dom for routing
Description
This PR updates the App component to use react-router-dom for routing, replacing the previous pathname-based conditional rendering. This change enhances navigation and improves code maintainability
Changes Proposed
1.Added Routing
- Implemented
BrowserRouter,Route, andRoutesfor robust navigation. - Defined routes for the main page and invalid routes
Checklist
- [x] I have read and followed the Contribution Guidelines.
- [x] All new and existing tests passed.
- [ ] I have updated the documentation to reflect the changes I've made.
- [x] My code follows the code style of this project.
- [x] The title of my pull request is a short description of the requested changes.
Benefits of react-router-dom Routing:
- Cleaner and more maintainable code structure.
- Easier scalability and addition of new routes.
- Built-in features like nested routes and redirects.
Drawbacks of Pathname Conditional Rendering:
- Cluttered and harder-to-maintain code.
- Limited flexibility and inconsistent navigation.
Screenshots
1.Current Production (Invalid Route)
2.Updated Code (Invalid Route)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| dev-find | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 23, 2024 6:18am |