Design comparison
Solution retrospective
This was a fun project! Let me know if you have any tips/suggestions or find any bugs, thanks!
- I'm still getting used to react and react components. I wondered how you would know when something should be a component or not? From my understanding, things that commonly are repeated should be a component, so should I make my tag buttons a component?
Community feedback
- @denieldenPosted almost 3 years ago
Hi Carlos,
Good practice would be to create a component for each piece by itself with functions on its own or for each design piece that can be reused. Carryover from the documentation:
But how do you know what should be its own component? Use the same techniques for deciding if you should create a new function or object. One such technique is the single responsibility principle, that is, a component should ideally only do one thing. If it ends up growing, it should be decomposed into smaller subcomponents.
Read here -> Thinking in React
Hope this help :)
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord