Design comparison
Solution retrospective
From the README.md file on the repository:
Due to some differences between React and vanilla JavaScript, this was the hardest Frontend Mentor challenge I've ever solved. The useful resources were indispensable.
Despite the difficulty and time spent, this challenge was really important for me to develop crucial React development skills. Thankfully I chose this one instead of a harder challenge.
Community feedback
- @peanutbutterjllyPosted over 1 year ago
hey 👋,
first, let me say that your solution is just about an exact pixel match, good job!
I'm just curious, what differences did you find from React to vanilla JS?
Also, is there a reason you chose to use React instead of just plain HTML/CSS/JS?
not knocking your decision at all FYI, I'm only asking out of curiosity. React can be 'harder' at first (especially when coming from vanilla css/js) but once you get your mind around the concept of components and whatnot it's a pretty cool library.
once again, good job on your solution! keep up the good work.
0@daniel-web-developerPosted over 1 year ago@peanutbutterjlly Thanks!
Regarding the differences between React and vanilla JS, the biggest problem I had was setting the "active" class on the button I was clicking. In JS I'd just select a [data-attribute], remove all classes, and then add it to the button clicked. In React, I couldn't do it and it took me multiple days to finally finish this challenge (I was trying to use React hooks at first). I guess I just have to learn more.
I chose React to practice it. Recruiters love it and I want a job haha.
1@peanutbutterjllyPosted over 1 year ago@daniel-web-developer
yea, React is crazy popular and is always in demand; I hope you didn't take my questioning the wrong way, I was just genuinely curious 🙃.
I think practicing new frameworks/libraries/methods on this site is a great way to practice - good choice practicing here.
I wonder if you could've used styled-components and put an onClick event handler on a button component?
How to dynamically change CSS with styled components
either way, you got it working and looking great! good job
Marked as helpful0@daniel-web-developerPosted over 1 year ago@peanutbutterjlly It was a good question. Thanks for the article, by the way. I'll definitely check it out!
1
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