wildan3105 / google-scraper

Google scraper
https://google-scraper-web-7922a635d04a.herokuapp.com/
0 stars 1 forks source link

[Chore] The Home component handles too many responsibilities #41

Open malparty opened 4 months ago

malparty commented 4 months ago

Issue

The file frontend/src/components/Home.tsx handles the following:

Expected

As much as possible, a React component should focus on a single responsibility. This not only helps with reading and maintaining the code, but also improve the code testability.

wildan3105 commented 4 months ago

Thank you for your insightful suggestions. Upon reflection (https://github.com/wildan3105/google-scraper/issues/40#issuecomment-2042372857), I realize that I may have underestimated the frontend implementation while focusing extensively on the backend aspects, which were optional according to the problem statement. Your guidance on adhering to the principle of single responsibility for React components is invaluable, and I wholeheartedly agree with it.

I appreciate your feedback. Moving forward, I will ensure that each React component focuses on a single responsibility to enhance code readability, maintainability, and testability.

Once again, thank you for taking the time to review and provide constructive feedback.