chore(angular-react): Migrate ItemsComponent to React #33
+125
−0
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.
chore(angular-react): Migrate ItemsComponent to React
Summary
Migrates the Angular ItemsComponent (container component for the shop items list) to React. This is a 1:1 migration following the Angular-to-React playbook.
The React component:
useStatehooks for items list and selected item state.map()(replacing Angular's*ngFor)*ngIf)Note: This PR adds React component files but does not add React dependencies to package.json. The project will need React, @testing-library/react, and Jest configured before these files can compile/run.
Review & Testing Checklist for Human
useStatefor items and selectedItem aligns with expected behaviorNotes
key={index}for item mapping - consider using a unique item identifier if items will be dynamically added/removedhandleAddItemcurrently just logs to console (matches Angular'ssaveItem()behavior)Link to Devin run: https://app.devin.ai/sessions/3f110c7af12e4ba4a1314700f73da9cd
Requested by: @milind-cognition