Design comparison
Solution retrospective
Hi, This is my first attepmt to this challenge (without the bonus functionality). In the (close) future I'm going to add sorting the list by drag and drop. Does anybody have and advices on this behalf? My plan is to use react-beautiful-dnd library, but maybe some of you have other suggestions? All the remarks on the code and advices for future development will be appreciated.
All the best!
Community feedback
- @djblackettPosted over 2 years ago
Nicely done. Your code is very readable too. I used Redux when I did this project, but it was definitely overkill and made the codebase messier than yours is. So it stands out to me how much cleaner yours is by comparison.
Implementing the DnD wasn't too bad. The documentation was fairly straightforward. I ran into the problem of my list glitching a bit after dragging stuff around, but I'm pretty sure it was because I was triggering extra renders that weren't necessary. I refactored my code and simplified things, and the problem went away. I was likely using useEffect incorrectly. Looking at how well your code is structured, I think you will have an easier time implemeting DnD than I did.
Marked as helpful0@KaskaS-OPosted over 2 years ago@djblackett Hi! Thanks a lot for such a nice opinion on my code. I've just updated the project with DnD - like you predicted it wasn't too difficult to refactore. Authors' free course on egghead.io also hepled a lot - I don't know if you've watched it but it really explains how it works and why.
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