Create a Horizontal Parallax ScrollView in React Native

InstructorJason Brown

Share this video with your friends

Send Tweet

In this lesson we'll create a Twitter Moments clone with a horizontal parallax image scrolling effect. We'll use Animated.event, and interpolation to make the effect work.

Nick P
~ 7 years ago

What's the package/shortcut being used at 1:25 that builds out a component for you?

Jason Browninstructor
~ 7 years ago

The package is actually just a bunch of custom snippets I created, you can grab them here https://gist.github.com/browniefed/abc2460df79d9dbae5421cde951e1ed1

To add them go to Code => Preferences => User Snippets Select JavaScript or JavaScript React and you can add them.

Torgeir Haugen
~ 7 years ago

In your getSeparator function I think it should be left: i * width 2.5? When you do i - 1 your first separator will be one width to the left of the views.