Submitted
Link-Sharing App with React, Node, Express, and Supabase/PostgreSQL
@ryanbradley-webdev
Design comparison
Solution retrospective
The most difficult part of this project would be the drag-and-drop functionality by a mile. After trying out a few different approaches that attempted to combine my methods for form validation, state management, and the reordering functionality, the solution I found was to 'clone' the node when the specific link is selected and reposition it based on mouse position, reordering the links when the selected link's position crossed certain thresholds on the page.
Maintaining a consistent layout while this is happening also proved difficult, however I found a solution that relied mainly on CSS. This solution relies on the ':has' selector as well as data-attributes for whether the links container contained a cloned node.
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