Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import type { ReanimatedHTMLElement } from '../js-reanimated';

const IS_WEB = isWeb();
const IS_JEST = isJest();
const SHOULD_BE_USE_WEB = shouldBeUseWeb();

if (IS_WEB) {
configureWebLayoutAnimations();
Expand Down Expand Up @@ -289,7 +290,7 @@ export function createAnimatedComponent(
? (this._component as AnimatedComponentRef).getAnimatableRef?.()
: this;

if (IS_WEB) {
if (SHOULD_BE_USE_WEB) {
// At this point I assume that `_setComponentRef` was already called and `_component` is set.
// `this._component` on web represents HTMLElement of our component, that's why we use casting
viewTag = this._component as HTMLElement;
Expand Down Expand Up @@ -501,7 +502,7 @@ export function createAnimatedComponent(
(layout || entering || exiting || sharedTransitionTag) &&
tag != null
) {
if (!shouldBeUseWeb()) {
if (!SHOULD_BE_USE_WEB) {
enableLayoutAnimations(true, false);
}

Expand Down