netceteragroup / skele

Architectural framework that assists building data-driven apps with React or React Native.
MIT License
163 stars 32 forks source link

Opt-out for onScroll #146

Closed usrbowe closed 4 years ago

usrbowe commented 5 years ago

Add opt-out mechanism to not rely on onScroll prop, if we want to use react-native-reanimated with onScroll to be assigned to event. I added internal method to update offset, which we can pass via ref.

Example of reanimated callback:

block([
    cond(
      greaterThan(diff(this._transY), 1),
      call([this._transY], ([y]) => this._viewportRef?.setOffset({ y }))
    ),
    this._transY,
  ]);
coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 460


Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/components/src/viewport/tracker/index.js 0 3 0.0%
<!-- Total: 0 3 0.0% -->
Totals Coverage Status
Change from base Build 459: -0.3%
Covered Lines: 1207
Relevant Lines: 1423

💛 - Coveralls
ognen commented 4 years ago

Hi, this pull request is rather unclean and I cannot accept it.