mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37157 ## Context NativeAnimatedHelper must be set up in a very particular way: - On iOS in Bridgeless mode, it must use NativeAnimated**Turbo**Module. - Everywhere else, it must use NativeAnimatedModule. ## Problem For some unknown reason, NativeAnimatedModule was getting loaded on D44933587. ## Changes This diff makes the aformentioned error impossible. It moves the module load gating logic into the two NativeModule spec files. Changelog: [Internal] Reviewed By: philIip Differential Revision: D45292907 fbshipit-source-id: 771bf64d7b491732e8860cf704bc9c3686980e74
18 lines
426 B
JavaScript
18 lines
426 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
* @format
|
|
*/
|
|
|
|
import Platform from '../Utilities/Platform';
|
|
|
|
function shouldUseTurboAnimatedModule(): boolean {
|
|
return Platform.OS === 'ios' && global.RN$Bridgeless === true;
|
|
}
|
|
|
|
export default shouldUseTurboAnimatedModule;
|