Crowdfunding Page - REACT/STYLED-COMPONENTS/FRAMER-MOTION

Solution retrospective
Hello everyone ! 🙂
Here is my version of this challenge, had a lot of fun, especially in trying to make smooth transitions ! I have a few questions:
-
How do you name your components when using a library such as styled-components ? When I use pure CSS I mainly try to follow BEM convention. However, here I'm not sure what is the best approach, thus I got lost really fast in my naming and it becomes hard to identify "what is what" haha. So I plan to refactor the code to make it more readable.
-
When I select a reward, I would like others to "unselect" so they toggle back. I've been struggling to find a solution even if I guess it's not a big deal I always ended up trying to do something complicated. Should I use radiobutton ? Or there is a simpler way to create a parent component that handle the toggle state of child components ?
Also, any feedbacks/remarks are welcomed, I already noticed that my code wasn't as generic a I want to, so I'll work on this as well. I finally decided to take the PRO subscription after completing a few challenges, can't wait to tackle even more interesting ones!
Have a nice day ☀️
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Rayane'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