Description
TextInput components are not rendering their initial value prop in the macOS version of the app. By setting initialValue or value, the content shows up as empty. If the user starts typing, the display is correct.
Context
Some ideas were discussed in this thread to solve this issue. The most promising one was to revert a section of a patch to fix this behavior. That was not succesful.
Steps to reproduce
Create a TextInput component with an initial value:
import { TextInput } from "react-native"
import { useState } from "react"
export function StateScreen() {
const [text, onChangeText] = useState("Reactotron")
return (
<TextInput
value={text}
onChangeText={onChangeText}
/>
)
}
Run the app on macOS
Observe that the TextInput appears empty despite having an initial value
Expected behavior
The TextInput should display "Reactotron" on initial render.
Actual behavior
The TextInput appears empty. The state value updates correctly when typing (confirmed via logging), but the initial value is not visible until user interaction begins.
Description
TextInputcomponents are not rendering their initial value prop in the macOS version of the app. By settinginitialValueorvalue, the content shows up as empty. If the user starts typing, the display is correct.Context
Some ideas were discussed in this thread to solve this issue. The most promising one was to revert a section of a patch to fix this behavior. That was not succesful.
Steps to reproduce
Create a
TextInputcomponent with an initial value:Run the app on macOS
Observe that the
TextInputappears empty despite having an initial valueExpected behavior
The
TextInputshould display "Reactotron" on initial render.Actual behavior
The
TextInputappears empty. The state value updates correctly when typing (confirmed via logging), but the initial value is not visible until user interaction begins.