Latest Changes #1

Open
eknoor547 wants to merge 4 commits from assignment-4 into main
Owner
No description provided.
eknoor547 added 1 commit 2025-01-02 06:07:43 +00:00
eknoor547 changed title from Latest Changes to WIP: Latest Changes 2025-01-02 06:17:07 +00:00
eknoor547 changed title from WIP: Latest Changes to Latest Changes 2025-01-02 06:17:22 +00:00
First-time contributor
  • Not using Optional chaining on front-end to access the object properties if the data is coming from back-end. This will lead to crash in application if some does not exist in an object.
  • Function naming is not specifying the action performed by a function.
  • Why we are using react/tanstack query.
  • Imported Axios but not using it any where.
- Not using Optional chaining on front-end to access the object properties if the data is coming from back-end. This will lead to crash in application if some does not exist in an object. - Function naming is not specifying the action performed by a function. - Why we are using react/tanstack query. - Imported Axios but not using it any where.
eknoor547 added 1 commit 2025-01-03 06:17:36 +00:00
Author
Owner

I have implemented all the changes but for point 2 in the feedback it was mentioned in the assignment to use "React Query for efficient data fetching and caching" under technical features section. So That' s why I implemented that. Rest of the changes have been done.

I have implemented all the changes but for point 2 in the feedback it was mentioned in the assignment to use "React Query for efficient data fetching and caching" under technical features section. So That' s why I implemented that. Rest of the changes have been done.
sumitdml123 requested changes 2025-01-03 10:00:40 +00:00
@ -0,0 +15,4 @@
<Users className="info-icon" />
{recipe?.servings || '4'} servings
</div>
{console.log(recipe?.servings)}
First-time contributor
  • The static value '4' used as a fallback for recipe?.servings is incorrect. Consider providing a more dynamic or meaningful default value.

  • Extra classes in RecipeCard: Review and remove any unnecessary CSS classes to simplify the component and improve performance.

  • Avoid leaving console logs in the production code; remove or replace them with appropriate error handling or logging mechanisms.

  • Ensure the code is formatted properly to improve readability and maintain consistency.

  • Why use useReducer: Clarify why useReducer is being used in this context instead of useState. This explanation can help understand the rationale for state management choices.

- The static value '4' used as a fallback for recipe?.servings is incorrect. Consider providing a more dynamic or meaningful default value. - Extra classes in RecipeCard: Review and remove any unnecessary CSS classes to simplify the component and improve performance. - Avoid leaving console logs in the production code; remove or replace them with appropriate error handling or logging mechanisms. - Ensure the code is formatted properly to improve readability and maintain consistency. - Why use useReducer: Clarify why useReducer is being used in this context instead of useState. This explanation can help understand the rationale for state management choices.
eknoor547 added 1 commit 2025-01-03 11:52:06 +00:00
Author
Owner
  1. Fixed the issues which were mentioned.
  2. useReducer is better option for state management than useState as there were many states to manage like diet, minutes, servings, time, ingredients etc. By using use state for all. it'll affect the quality of the code and will ruin it's readability and difficult to understand and debug.
  3. As it was also mentioned in the assignment only to use useReducer for state management.
1. Fixed the issues which were mentioned. 2. useReducer is better option for state management than useState as there were many states to manage like diet, minutes, servings, time, ingredients etc. By using use state for all. it'll affect the quality of the code and will ruin it's readability and difficult to understand and debug. 3. As it was also mentioned in the assignment only to use useReducer for state management.
eknoor547 requested review from sumitdml123 2025-01-14 11:21:20 +00:00
eknoor547 requested review from mayank.sethi 2025-01-14 13:19:56 +00:00
eknoor547 added 1 commit 2025-01-15 09:05:22 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin assignment-4:assignment-4
git checkout assignment-4

Merge

Merge the changes and update on Forgejo.
git checkout main
git merge --no-ff assignment-4
git checkout main
git merge --ff-only assignment-4
git checkout assignment-4
git rebase main
git checkout main
git merge --no-ff assignment-4
git checkout main
git merge --squash assignment-4
git checkout main
git merge --ff-only assignment-4
git checkout main
git merge assignment-4
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: eknoor547/Assignment_4#1
No description provided.