mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
use C++ Native Animated from JS if enabled (#51337)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51337 changelog: [internal] When C++ Native Animated is used, we can't be using TurboModuleAnimated native module. This diff just add the check to make sure that if C++ Native Animated is used, it will be correctly referenced from JS. Reviewed By: lenaic Differential Revision: D74490166 fbshipit-source-id: 1b6de3227707168618052ff4ca6a02ca11337607
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8672faef87
commit
0ac82ef83a
@@ -8,10 +8,15 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
|
||||
import Platform from '../Utilities/Platform';
|
||||
|
||||
function shouldUseTurboAnimatedModule(): boolean {
|
||||
return Platform.OS === 'ios' && global.RN$Bridgeless === true;
|
||||
if (ReactNativeFeatureFlags.cxxNativeAnimatedEnabled()) {
|
||||
return false;
|
||||
} else {
|
||||
return Platform.OS === 'ios' && global.RN$Bridgeless === true;
|
||||
}
|
||||
}
|
||||
|
||||
export default shouldUseTurboAnimatedModule;
|
||||
|
||||
Reference in New Issue
Block a user