zachgibson / react-native-parallax-swiper

Paged Parallax Swiper with Effects
MIT License
623 stars 76 forks source link

API 1.0.0 #7

Closed zachgibson closed 6 years ago

zachgibson commented 6 years ago

This PR aims to do three major things:

  1. Create constraints to further clarify purpose of this library
    • ParallaxSwiperPage component replaces arbitrary React elements as children
    • BackgroundComponent and ForegroundComponent props define UI behavior
  2. Allow any UI to be consumed by ‘pages’ and be agnostic to their props
    • e.g. use react-native-video and let user handle state/props on their end
  3. Normalize the property that handles parallax and make it relative to ParallaxSwiperPage
    • BackgroundComponent stays still with speed={0} and moves at scroll rate with speed={1}

Amongst these bigger changes are examples containing use cases regarding this UI pattern and smaller ones like fixing wrongful peer-dependency warnings. Also included are some changes to API endpoints to reduce un-helpful redundancy in nomenclature.