Use React Native to Animate a Swipe Away Comment Modal

InstructorJason Brown

Share this video with your friends

Send Tweet

In this lesson we'll use PanResponder gesture handlers to add the ability to swipe a modal closed in either direction. We'll need ScrollView callbacks to allow us to still scroll through comments and only close when desired. We'll use the Animated.setValue function to translate our Modal up or down depending on the direction of the swipe.