Migrate from Angular 9 to React (Vite + TypeScript)#303
Closed
vibhaseshadri-cognition wants to merge 1 commit into
Closed
Migrate from Angular 9 to React (Vite + TypeScript)#303vibhaseshadri-cognition wants to merge 1 commit into
vibhaseshadri-cognition wants to merge 1 commit into
Conversation
- Replace Angular 9 with Vite + React 19 + TypeScript 5.7 - Port all models as TypeScript interfaces - Create API service with fetch + async/await (replaces RxJS observables) - Implement SettingsContext (replaces SettingsService) with localStorage persistence - Set up React Router v6 with same route structure - Port all components: Header, Footer, Settings, Loader, ErrorMessage - Port all pages: Feed, ItemDetails (with recursive Comment tree), User - Use @tanstack/react-query for data fetching + caching - DOMPurify for HTML sanitization (replaces Angular pipe) - Code splitting with React.lazy for ItemDetails and User pages - PWA support via vite-plugin-pwa (replaces ngsw) - Full SCSS theme engine ported (default, night, amoledblack) - ESLint 9 flat config + Prettier (same config as original) - Vitest + React Testing Library for unit tests - GitHub Actions CI/CD (replaces Travis CI) - Firebase hosting config updated for Vite dist output - Remove all Angular-specific files Co-Authored-By: Vibha Seshadri <vibha.seshadri@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Full migration from Angular 9 to React 19 + Vite 6 + TypeScript 5.7 with complete feature parity.
Architecture changes
Observable+ customlazyFetchwrapper@tanstack/react-query+ plainfetch/async-awaitSettingsService(singleton@Injectable)SettingsContext+useSettings()hook@angular/routerwith lazy-loaded modulesreact-router-domv6 withReact.lazy()+Suspense[innerHTML]DOMPurify.sanitize()+dangerouslySetInnerHTML@angular/service-worker+ngsw-config.jsonvite-plugin-pwa(Workbox) with precache + runtime API cachestyleUrls)_themes.scss)npm ci && lint && typecheck && build && testKey implementation details
classtointerface(src/models/)fetchItemContentresolves poll options withPromise.allinstead of nestedsubscribecalls@mixin theme(...)with 3 themes (default/night/amoledblack) is preserved. Theme class applied at root<div className={theme}>.ItemDetailsandUserpages areReact.lazy()loaded, matching Angular'sloadChildrenlazy modulesformatCommentCount()utility functionsrc/assets/→public/assets/for Vite's static file servinghosting.publicupdated fromdist/angular-hnpwatodistRemoved files
All Angular-specific:
angular.json,tsconfig.app.json,tsconfig.spec.json,karma.conf.js,e2e/,tslint.json,.travis.yml,browserslist,yarn.lock,src/app/,ngsw-config.json,src/manifest.json.Link to Devin session: https://app.devin.ai/sessions/929a472db24a46a487606391f6fd2a7f
Requested by: @vibhaseshadri-cognition
Devin Review