Unblock React Compiler for 6 components by removing render-phase ref access (#11544)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tomasz Zawadzki
2026-08-27 17:10:10 +02:00
committed by GitHub
parent b9bff931a3
commit f298a4ef5e
6 changed files with 27 additions and 41 deletions
@@ -9,7 +9,7 @@ import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {mergeRefs} from '#/lib/merge-refs'
import {atoms as a, ios, platform, useTheme} from '#/alf'
import {atoms as a, platform, useTheme} from '#/alf'
import {useInteractionState} from '#/components/hooks/useInteractionState'
import {Text} from '#/components/Typography'
import {IS_ANDROID, IS_IOS} from '#/env'
@@ -94,7 +94,11 @@ export function OTPInput({
</View>
<TextInput
// SMS autofill is borked on iOS if you open the keyboard immediately -sfn
onLayout={ios(() => setTimeout(() => innerRef.current?.focus(), 100))}
onLayout={
IS_IOS
? () => setTimeout(() => innerRef.current?.focus(), 100)
: undefined
}
autoFocus={IS_ANDROID}
accessible
accessibilityLabel={label}