Social media dashboard w/ theme switcher [React.js + Tailwind + json]

Solution retrospective
Though there isn't any re-design for this challenge, I took a lil' time to refactor my code and I am pretty happy with the organization so far.
- The social media data is consolidated into a JSON file
- HTML elements, and also the value for the total number of followers, are dynamically generated using javascript array methods like map and reduce, as well as expressions like ternary operators.
- I also created a helper.js file to contain common functions such as the function to format numbers more than 9999 to __k
Even though this organization may be a little overkill for such a challenge, I thought it trains me to write more maintainable and 'DRY' code starting from even the simplest challenges.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Jo Young's solution.
Join 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