feat: Migrate Angular 2 Hacker News client to React #140
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: Migrate Angular 2 Hacker News client to React
Summary
This PR creates a new React application that replicates the functionality of the existing Angular 9 Hacker News PWA client. The React app is located in the
react-app/directory alongside the original Angular app.Key changes include:
useFeed,useItem,useUser) replacing the AngularHackerNewsAPIServiceSettingsContext) replacing the AngularSettingsServicewith localStorage persistenceUpdates since last revision
unfetchdependency and switched to native browserfetchAPI (the unfetch package had ESM compatibility issues with Vite)View original video (rec-4b0c32007a484194a356af378bd823bf-edited.mp4)
Review & Testing Checklist for Human
cd react-app && npm install && npm run dev) and verify it loads without errorshttps://node-hnapi.herokuapp.comwhich may have availability issuesRecommended test plan: Run both the Angular app (
npm startin root) and React app (npm run devin react-app/) simultaneously and compare functionality across all pages.Notes
react-app/directory - the original Angular app remains unchanged@importrules (will be removed in Dart Sass 3.0.0) - these are warnings only and do not affect functionalitynpm run build && npm run preview)package-lock.jsonmay still referenceunfetchfrom initial install, but it's no longer used in the codeLink to Devin run: https://app.devin.ai/sessions/628f8c3e14a64aae82d61be7ff63ea6f
Requested by: Eashan Sinha (eashan.sinha@cognition.ai) / @eashansinha-cog