Disable animations in bridgeless mode

Summary:
Bridgeless mode requires all native modules to be turbomodules. The iOS animated module was converted to TM, but reverted due to perf issues. RSNara is looking into it, but it may be an involved fix. As a short term workaround, to unblock release mode testing of bridgeless mode, use `AnimatedMock`.

Changelog: [Internal] Disable animations in bridgeless mode

Reviewed By: RSNara

Differential Revision: D19729827

fbshipit-source-id: e6c4d89258ec23da252c047b4c67c171f7f21c25
This commit is contained in:
Peter Argany 2020-02-04 15:28:20 -08:00 коммит произвёл Facebook Github Bot
Родитель 2a0c4c878e
Коммит 5ad964ba3e
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -18,7 +18,8 @@ import type {AnimatedComponentType} from './createAnimatedComponent';
const AnimatedMock = require('./AnimatedMock');
const AnimatedImplementation = require('./AnimatedImplementation');
const Animated = ((Platform.isTesting
//TODO(T57411659): Remove the bridgeless check when Animated perf regressions are fixed.
const Animated = ((Platform.isTesting || global.RN$Bridgeless
? AnimatedMock
: AnimatedImplementation): typeof AnimatedMock);