DEV Community

Cover image for Another project added semi-complete
danielarmbruster0314
danielarmbruster0314

Posted on

2

Another project added semi-complete

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:

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay