Countdown Flip cards with React / styled-components / date-fns

Solution retrospective
I think the most difficult part of this project is how to restart the animation with react. At the beginning, I tried to just use styled-components to style elements. However, I found that it is difficult to make the element restart its animation whenever it render. To solve this problem, I create a css file such that I can restart the animation by changing the class. Another problem is that it looks terrible on real phone, but it looks good on dev tool. I don't know why.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @buneeIsSlo
Hey @jason89521, I don't know any react but, Your solution responds very well. Great job! :)
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