-
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
nima-react-w2 #17
base: main
Are you sure you want to change the base?
nima-react-w2 #17
Conversation
This is the link to Netlify. |
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.
Good job overall! 🌟
/> | ||
<Route path="/product/:id" element={<ProductDetail />} /> | ||
</Routes> | ||
</div> |
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.
Good job!
I would suggest keeping the routes in App.js, but moving the rest of the logic into separate components.
Additionally, you can move the API logic into a separate file for better organization and maintainability.
<h2>{product.title}</h2> | ||
<p>{product.description}</p> | ||
<p>Price: ${product.price}</p> | ||
<button onClick={() => window.history.back()}>Go Back</button> |
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
you can also try react router useNavigate api
No description provided.