Open nokolo99 opened 1 year ago
Great work so far!
However, I agree with Nneka's feedback.
In addition, I would like to see these suggestions in your next project:
Consider installing a code formatting extension like prettier
and use it to format your code before committing. These tools can make it easier for you to ensure that your code is properly formatted.
Additionally, you can read on javascript style guidelines to learn about the specifics.
Naming
Naming Style
Good working on keeping naming style consistent. I only saw one instance of where you did not.
https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/About%20Us/About%20Us.css#L11-L25
See how
.About
and.AboutLetter
have the first letter capitalized while.aboutBody
does not. Keep on working towards getting the naming consistent 100% across the board.Naming Choice
Overall you have shown strong choice in variable names. However in the following code:
https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/PlusMinusButton/PlusMinusButton.jsx#L11-L18
you have functions
handleClick
andhandleDecrement
. RenaminghandleClick
tohandleIncrement
makes it more clear what that specific function does and is complementary to the namehandleDecrement
.Styling
Your style is also something that has improved since week 1. Two small little things that I just want you to be aware of:
https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/App/App.css#L1-L17
In this snippet of code, the starting brackets
{
have a lot of space between them and the name of the class. I suspect you misunderstood what I said when I mentioned that ending brackets should be aligned. This feedback was specific to the ending tags of html files. Instead, in this case you would want the start bracket to directly follow the class name like you did in several other instance:https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/About%20Us/About%20Us.css#L1-L9
Finally, watch out for unintentional indents. You can see in
https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/Footer/Footer.css#L1-L14
everything except
.footer
is indented by one tab.Complexity
Complex Functions
You demonstrated a ton of technical complexity this week! Keep this up.
https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/App/App.jsx#L23-L49
In the example code, you have two complex functions
handleAddItemToCart
andhandleRemoveItemFromCart
that required you to add and remove items for your cart. This involved checking if the item was already in the cart beforehand, actually performing the desired action, and ensuring the shopping cart is updated with the correct values. These are the type of complex functions that you will utilizing a lot more of in your own capstone project.Complex React Code
This week I saw an increased use of complex react syntax like in the following. This makes the code easier to read and understand. It also helps you become a more proficient programmer! Keep looking for ways to incorporate more complex react functions!
https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/SideBar/SideBar.jsx#L53-L66
Repeating Code
Checkout.jsx
andShoppingCart.jsx
utilized a lot of the same codehttps://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/Checkout/Checkout.jsx#L9-L28
https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/ShoppingCart/ShoppingCart.jsx#L10-L29
One thing we encourage in software engineering is minimizing the use of repeat code. Since these lines of code are exactly identical, it is encouraged to find a way to reduce this repeat code. One way of doing this is by created a shared
Utils
file that houses this shared code that can be used in both locations.Nits
What is a Nit? The meta definition is:
Some minor nits I have for you:
Checkout.jsx
you had an unused variablecost
. Try not to include unused variables in your final code https://github.com/ArinolaMordi/site-week2-project2-student-store-starter/blob/45841bc37771d26c90a7dd036ec4db0514859c8f/student-store-ui/src/components/Checkout/Checkout.jsx#L21-L24Checkout.css
is an empty file. However, good job of not creating another necessary css file to complementPlusMinusButton.jsx
since it was not necessary