-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tugbanur-React week2 #16
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 👏👏
I’d like to point out two things:
When starting work, always check out from the main branch. This makes it easier for us to review only the files that were changed during the week.
It would be better to move the API logic into a separate file for cleaner and more organized code.
} | ||
/> | ||
<Route path="/product/:id" element={<ProductDetail />} /> | ||
</Routes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
Next time try moving the Routes and Route setup into a separate file or component. This will make the code easier to read and manage, especially if you add more routes in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I will do that in the project. Thanks for your feedback
import { useEffect, useState } from "react"; | ||
|
||
const ProductDetail = () => { | ||
const { id } = useParams(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👏👏
No description provided.