Phase 1: Initialize React Migration - Setup and Infrastructure #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Phase 1: Initialize React Migration - Setup and Infrastructure
Summary
This PR initializes Phase 1 of the Angular-to-React migration for the Hacker News client. It creates a complete new React + TypeScript project in the
react-app/subdirectory with Vite, React Router, and PWA support using Workbox. The Angular app remains untouched - this sets up the foundation for future component migration.Key Changes:
react-app/Not Included (Future Phases):
Review & Testing Checklist for Human
Critical items to verify (5):
cd react-app && npm install && npm run build && npm run preview, open http://localhost:4173, verify service worker registers in DevTools (Application > Service Workers)/redirects to/news/1, test/news/1,/newest/1,/show/1,/ask/1,/jobs/1,/item/123,/user/testall load with correct parametersreact-app/vite.config.ts(lines 42-56) with Angular'sngsw-config.jsonto ensure caching strategies matchRecommended test plan:
Notes
react-refresh/only-export-componentsin.eslintrc.cjsbecause exporting hooks with their providers from the same file is a common React pattern. If this is problematic, I can split theuseSettingshook into a separate file..browserslistrc(> 0.5%, last 2 versions, Firefox ESR, not IE 9-11)Link to Devin run: https://app.devin.ai/sessions/c70dbf7d06bf4ec299c2eb20a5e62be0
Requested by: Gabe Smith
Screenshots from local testing:

