Giter Site home page Giter Site logo

Comments (9)

vjeux avatar vjeux commented on March 28, 2024

Hmm this is weird, you should receive an onScroll event every 200ms

https://phabricator.fb.com/diffusion/FBOBJC/browse/master/Libraries/FBReactKit/js/RKJSModules/Libraries/Components/ScrollViewPropTypes.js;ab0173e350a5d5a542bbbb1af82e36cb9e82609e$27

from react-native.

nick avatar nick commented on March 28, 2024

If I set a value for throttleScrollCallbackMS then it works :-)

from react-native.

frantic avatar frantic commented on March 28, 2024

@vjeux - the comment in the code is misleading, looks like we don't default to 200ms. @nick you are right, to receive the event continuously, you have to explicitly tell how often it should fire. The design decision here was driven by perf considerations - we don't want to spam the bridge with commands you are not interested in. If you want to animate something when scrolling, set throttleScrollCallbackMS to 16ms or less.

from react-native.

vjeux avatar vjeux commented on March 28, 2024

Just made a diff internally to add a warning. D1833444 (for tracking purposes)

from react-native.

vjeux avatar vjeux commented on March 28, 2024

Warning is now in: dd78b09

from react-native.

cleercode avatar cleercode commented on March 28, 2024

I set throttleScrollCallbackMS={16} and the warning doesn't show but I seem to still only get one event fired. Also only seeing one event logged in the UIExplorer example.

from react-native.

ssssssssssss avatar ssssssssssss commented on March 28, 2024

Don't work for listview

from react-native.

nicklockwood avatar nicklockwood commented on March 28, 2024

The throttleScrollCallbacksMS property is now called scrollEventThrottle.

from react-native.

nicklockwood avatar nicklockwood commented on March 28, 2024

Looks like the warning wasn't updated when the property name was changed.

from react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.