How to drag and drop a div in react using hooks? (react-use-gesture + react-spring)

Published: 01 May 2021
on channel: BiteSize Academy
17,191
414

⚡️ Live demo and source code: https://www.undefinedapps.com/post/dr...

In this video we look at how to drag and drop in react using the react-use-gesture and react-spring libraries. We take the introduction screen of create-react-app and add dragging to its components. We then add an overlay which can be dragged up and down to expose a background image behind it. We use the hooks: useDrag (from react-use-gesture) and useSpring (from react-spring).

My previous video about react-spring: How to animate mount and unmount of a react component using react-spring    • How to animate mount and unmount of a...  

⭐️ Subscribe for more content: https://newsletter.undefinedapps.com/

Background image by Adam Vradenburg @vradenburg https://unsplash.com/photos/_gu7E90QChU

#react #animate #javascript


Watch video How to drag and drop a div in react using hooks? (react-use-gesture + react-spring) online without registration, duration hours minute second in high quality. This video was added by user BiteSize Academy 01 May 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 17,191 once and liked it 414 people.