@DavidMorgade
Posted
Hello Mike, congrats on finishing the challenge! great job, you almost got it pixel perfect!
Let me try to answer your questions.
-
Well, depends a lot but most of the time is a must to use those tags to give your site more accesibility and search engine optimization, but, for example, for a web application that doesn't need to rank on search engines, or for simple challenges like this that doesn't even haver a header or footer, is not necessary!. For example, figma web doesn't even use any semantic tag, because is a web application that you access from other page and doesn't need any kind of SEO optimization.
-
I would probably use a
<button>
instead of an anchor tag with a div for the add to cart button, only use thea
tag, if the thing you are clicking is getting you to other part of the page, or outside the page, basically use it if its for navegate to other place. -
Never, the more components you get, the more optimized your code will be, you will encounter less bugs and your code will be much more readable if you structure it well in different folders depending on the type of components, for this challenge it doesn't matter that much, but for biggest projects it will be more usefull to avoid repetition.
-
I'm not that fan of defining variables for sizes, but in the way you wrote it there it will be easy to scale you app and make changes on the sizes faster.
Hope my feedback helps you, and thank you for making some interesting questions here!, good solution too!
@MikeyOnyedika
Posted
@DavidMorgade hello David, I hope you are doing fine! Thank you so so much for taking time out of your busy schedule to go through my solution and give some feedback (this is my very first challenge). I appreciate the points you made and I will be taking note of them when I start working on my next challenge. In your final point, you said you're not a fan of defining variables for sizes, I am just curious but is there a reason to that or just personal preference?
@DavidMorgade
Posted
@MikeyOnyedika Personal preference, I just don't like it, but that doesn't mean that is a bad practice!
@MikeyOnyedika
Posted
@DavidMorgade Thanks alot!