mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
4fdbc44ab5
Summary: When we were iterating on the Fabric renderer, animated components went through some iteration to ensure that animated shadow nodes were not flattened away. At the time, `collapsable` was not supported on iOS, even in Fabric, because the legacy renderer would not publish the `collapsable` prop on the view config. This has since been fixed and `collapsable` is supported on both Android and iOS. We no longer need the `nativeID` workaround to prevent view flattening. For use cases of the JavaScript driver and legacy renderers, this change will cause views which used to be flattened to no longer be flattened. This seems like an appropriate change considering the direction that we are moving (in which everything is eventually transitioned to using the Fabric renderer). Changelog: [Android][Changed] - Native views backing Animated.View (w/ JavaScript-driven animations) will no longer be flattened; this should be a transparent change. Reviewed By: lunaleaps, mdvacca Differential Revision: D31223031 fbshipit-source-id: 48dc63471eef406f4c215bfea0b3ef82a05d4b24
31 lines
873 B
JavaScript
31 lines
873 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
|
|
*/
|
|
|
|
import * as React from 'react';
|
|
|
|
const ScrollView = require('../../Components/ScrollView/ScrollView');
|
|
const createAnimatedComponent = require('../createAnimatedComponent');
|
|
|
|
import type {AnimatedComponentType} from '../createAnimatedComponent';
|
|
|
|
/**
|
|
* @see https://github.com/facebook/react-native/commit/b8c8562
|
|
*/
|
|
const ScrollViewWithEventThrottle = React.forwardRef((props, ref) => (
|
|
<ScrollView scrollEventThrottle={0.0001} {...props} ref={ref} />
|
|
));
|
|
|
|
module.exports = (createAnimatedComponent(
|
|
ScrollViewWithEventThrottle,
|
|
): AnimatedComponentType<
|
|
React.ElementConfig<typeof ScrollView>,
|
|
React.ElementRef<typeof ScrollView>,
|
|
>);
|