Submitted almost 2 years ago
Result Component with React & CSS Modules
@hendrickmanullang
Design comparison
SolutionDesign
Solution retrospective
Took this opportunity to have a bit of practice with React (boy, it's been a while)!
My main issue was implementing a transition effect on the submit button's background color on hover.
Initially, I applied it via transition: backrgound-color 0.2s
on the .btn
default state but this turned out janky (it looked like the button flashed on mouse-enter
and the transition only triggered on mouse-leave
).
A bit of searching tells me that I can use the CSSTransition component for this.
Is this the best way to add transition effects into React or is there a native way to do it?
Community feedback
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