Migrate Angular 2 HN application to React #141
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 2 HN application to React
Summary
This PR performs a complete framework migration of the Hacker News client from Angular 9 to React 18. The migration includes:
React.lazy()HackerNewsAPIService→useHackerNewsAPIcustom hookSettingsService→useSettingshook with Context APIvite-plugin-pwawith WorkboxThe API endpoint (
https://node-hnapi.herokuapp.com) and all business logic remain unchanged.Local Testing Performed
The app was tested locally with the following results:
/news/1Potential Issue Found: User profile page showed error "Could not load user gregsadetsky" during testing. This may be an API issue or a bug in the User component - please verify.
View original video (rec-d4d95a8ecfec4fffb1fb2ad87a1fe578-edited.mp4)
Review & Testing Checklist for Human
This is a high-risk PR due to the complete framework rewrite. Please verify:
Recommended Test Plan
npm install && npm startto start the dev serverNotes
npm run build) and CI checks (Snyk security/license) have passed@importinstead of@use) but do not affect functionalityLink to Devin run: https://app.devin.ai/sessions/3a7bf1880bde4b67b287d3259821330c
Requested by: Eashan Sinha (eashan.sinha@cognition.ai) / @eashansinha-cog