TextInput value cannot be manipulated via setNativeProps after user input on iOS
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C++
- Estrellas
- 127k
- Forks
- 25.3k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 4
Descripción
Description
When an uncontrolled TextInput has had its value manipulated via setNativeProps, receives user input and is then manipulated again via setNativeProps, the displayed value does not change.
This looks to be a New Arch issue and the issue is not reproducible in 0.76.0 on the old architecture.
Steps to reproduce
- Install the application with
yarn ios - Press "Press me!"
- Note that the TextInput contains the text "bananas"
- Clear the input field
- Press "Press me!"
- Note that the input field remains empty
React Native Version
0.76.0
Affected Platforms
Runtime - iOS
Areas
Fabric - The New Renderer
Output of npx react-native info
System:
OS: macOS 14.7
CPU: (16) arm64 Apple M3 Max
Memory: 2.53 GB / 48.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.20.4
path: /opt/homebrew/Cellar/node@18/18.20.4_1/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 10.7.0
path: /opt/homebrew/Cellar/node@18/18.20.4_1/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.0
- iOS 18.0
- macOS 15.0
- tvOS 18.0
- visionOS 2.0
- watchOS 11.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 16.0/16A242d
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.0-alpha.2
wanted: 15.0.0-alpha.2
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.0
wanted: 0.76.0
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
None
Reproducer
https://github.com/mhoran/new-arch-set-text-repro/
Screenshots and Videos
No response
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Usa el repositorio enlazado new-arch-set-text-repro y ejecútalo con yarn ios bajo la configuración de New Architecture de React Native 0.76.0 indicada. Reproduce la secuencia de establecer “bananas”, introducir una entrada del usuario, borrarla y volver a pulsar el botón; se considera hecho cuando la segunda actualización nativa cambia el valor mostrado de TextInput.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- ios, javascript, react-native
- Área
- mobile
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100