Join Samer Buna for an in-depth discussion in this video Preparing the PanHandlers, part of React Native Essential Training.
- [Instructor] The first thing we need to do…to implement the swiping of the deal images feature…is the make the active image index…part of the component state,…because we want to change the image index…and have the image changes.…So let's do that first.…I'll name it imageIndex,…and this starts from zero,…and in here, instead of hard coding the first element here,…we'll read the image from this.state.imageIndex.…
Let me format everything.…So this should not really change anything…except now we have the ability of…changing the image index and that will change the image.…In fact, we can test that from the developer tool.…So I'll look for the detail view,…go in here, change the image index to one,…and see the image changes.…The next thing we can do is to define the PanResponder.…So from React Native, we'll import PanResponder.…We'll also Animated, because we know we need to use…Animated as well.…
So we have PanResponder and Animated.…And we'll create a PanResponder object.…I'm going to name it imagePanResponder.…This is a PanResponder.create call,…
- Hello React Native on iOS and Android
- Styling React Native components
- Platform APIs
- Building a simple game app and a data-driven app
- Using the Fetch API
- Creating an animation loop
- Testing on Android
- Changing an app logo and a splash screen
- Using TestFlight with internal testers
Skill Level Intermediate
1. Getting Started
2. React Native Fundamentals
Hello React Native on iOS5m 42s
3. Building a Simple Game App
4. Building a Data-driven App
5. Animation and Gesture Control
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.