Today I submitted my coding project for my coding bootcamp witch utilized both a React client side model and a Ruby server side model. The project was built between me and my partner and was a amazon-clone(very original I know). Building this project was really fun and a lot of work for one week so there are tones of areas in the code that need refactoring and revision. Also I wanted to create a filter page for the items in the inventory, a render of the average rating of each product, and a working login page, however just developing the application in its current state came with its fair share of struggles. I think whenever I have more time I plan on revisiting this project and adding those final touches. The biggest error or issue I was having is that I tried to use the useContext feature from React however it was creating some bugs due to how the app was mounting. This was causing all of my data objects to not set in state. Some solutions I tried to implement to work around this was to use a useEffect hook and a time out function, however it was still having some issues so I resulted to prop drilling, which would not be the optimal solution for sure. The coding problem I had the most fun creating and solving was the rating feature that would generate either a filled star or an outlined star depending on the rating of the product. To achieve this I created an array of five zeros and applied a fill method based on the object rating amount and would fill the given positions in the array with a value of 1 and the return a star if the value was 1 and an outline if the value was zero. Vimeo:
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)