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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user