mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary:
`scrollEventThrottle` is often a source of confusion, especially when using native animated since users expect that it doesn't affect `Animated.event` but it does. We added a default prop to Animated.ScrollView but not to `Animated.FlatList` and `Animated.SectionList` so this adds it for those.
## Changelog
[JavaScript] [Added] - Add default scrollEventThrottle to Animated{FlatList, SectionList}
Pull Request resolved: https://github.com/facebook/react-native/pull/24954
Differential Revision: D15411998
Pulled By: cpojer
fbshipit-source-id: 41589a96c0a8b75ae7cf3169ccef363ac5140ad3
20 lines
464 B
JavaScript
20 lines
464 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const SectionList = require('../../../Lists/SectionList');
|
|
|
|
const createAnimatedComponent = require('../createAnimatedComponent');
|
|
|
|
module.exports = createAnimatedComponent(SectionList, {
|
|
scrollEventThrottle: 0.0001,
|
|
});
|