Hacker News new | ask | show | jobs
by crestedtazo 3369 days ago
Reading this, it looks like your app was a house of cards because that's exactly how you designed and built it. It was only when it started to hurt your productivity did you realize the mistake.

Honestly, who thought it would be a good idea to have a UI element that appears many times in a single page be responsible for fetching its own data?

This guy is a senior engineer but has never heard of higher-order components or the container pattern? Smells fishy...

1 comments

I learned from a great dev not long ago that the data structure is often the most important aspect in developing a system. Like you, I was thinking - why would products, likes status and like count be a different call for each individual card. That is obviously inefficient use of both network and drawing as the DOM will be continually drawing as the requests return.