I am new to React Native and to TypeScript. I was wondering if it is possible to create a picker completely dynamically. For instance, instead of using (const [selectedQLType, setQLTypePicker] = useState('');) is it possible to dynamically create those state variable so that you can then generate severals pickers using a map function for instance based on an array of parameters ?
import {Picker} from '@react-native-picker/picker';
...const [selectedQLType, setQLTypePicker] = useState('');
return (<View> <Picker selectedValue={selectedQLType} onValueChange={(itemValue, itemIndex) => setQLTypePicker(itemValue)}> {variableType.map(itemIdx => <Picker.Item label={itemIdx} key={itemIdx} value={itemIdx} />)} </Picker>