Migrate Angular 9 Hacker News client to React 18 #145
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.
Migrate Angular 9 Hacker News client to React 18
Summary
This PR performs a complete framework migration from Angular 9 to React 18 for the Hacker News client application. The migration includes:
Phase 1 - Foundation Setup:
Phase 2 - Core Feature Migration:
HackerNewsAPIServiceto React Query hooks (useHackerNews.ts)SettingsServiceto React Context + custom hook pattern (SettingsContext.tsx)FeedComponentandItemComponentto React functional componentsPhase 3 - Advanced Features:
ItemDetailsComponent,CommentComponent(with recursive rendering), andUserComponentPhase 4 - PWA & Optimization:
vite-plugin-pwaReact.lazy()andSuspenseReview & Testing Checklist for Human
This is a high-risk PR due to the complete framework rewrite. Please verify the following:
npm install && npm run dev) and verify the home page loads with news feed items/news/:page,/newest/:page,/show/:page,/ask/:page,/jobs/:page,/item/:id,/user/:idRecommended test plan:
npm install && npm run devnode-hnapi.herokuapp.comnpm run buildto verify production build succeedsNotes
Link to Devin run: https://app.devin.ai/sessions/ce342de433804bf6a07c9cae9cc126a3
Requested by: Satwik Bebortha (satwik.bebortha@cognition.ai) / @satwik-cog