diff --git a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js index 8e6b10479de7..681603a8800e 100644 --- a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js +++ b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js @@ -12,22 +12,69 @@ import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import RNTesterText from '../../components/RNTesterText'; import * as React from 'react'; -import {StyleSheet, View} from 'react-native'; +import {useState} from 'react'; +import {Button, StyleSheet, TextInput, View} from 'react-native'; +// Type into each input. Then either change the OS text size while the app +// runs (Settings > Accessibility > Display & Text Size > Larger Text, or +// `xcrun simctl ui booted content_size accessibility-large`) or press +// "Toggle text color". +// Expected: every input keeps the text you typed. +// Actual on iOS: the uncontrolled inputs drop the typed text (to "" or to +// defaultValue). The controlled input keeps it. function Playground() { + const [controlledValue, setControlledValue] = useState(''); + const [red, setRed] = useState(false); + const inputStyle = [styles.input, red && styles.red]; return ( - Edit "RNTesterPlayground.js" to change this file + Type into each input, then change the OS text size or press "Toggle + text color". Every input must keep its text. +