feat: Initialize React Infrastructure (Phase 1 Migration) #87
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.
feat: Initialize React Infrastructure (Phase 1 Migration)
Summary
This PR sets up the foundational React infrastructure for migrating Angular2-HN to React while keeping the Angular app fully functional. The React app lives in a new
react-app/directory and includes:/→/news/1/news/:page,/newest/:page,/show/:page,/ask/:page,/jobs/:page/item/:id,/user/:idImportant: All components are currently placeholders with no HN API integration. This is intentional for Phase 1 - actual functionality will be implemented in subsequent phases.
Review & Testing Checklist for Human
src/app/app.routes.tsin the Angular app and verify thatreact-app/src/routes/index.tsxmatches it exactly (especially the root redirect and feed type handling)cd react-app && npm run build && npm run preview, then check if the app is installable and service worker registers correctly in browser DevToolsmanifest.webmanifestafter building and verify icon paths resolve correctlynpm startfrom the root directoryBrowser Testing Screenshots
I tested all routes in the development server - here are screenshots showing each route working:
Notes
.eslintrc.jsonformat (more common in React projects).tsbuildinfofiles are included in the commit (TypeScript incremental build cache)Link to Devin run: https://app.devin.ai/sessions/2e8a734264e541c080f0e0d7a57a9a25
Requested by: Gabe Smith ([email protected])