The value isn't updating when I select an option in RNPickerSelect.
<RNPickerSelect
key={comp}
fixAndroidTouchableBug={true}
useNativeAndroidPickerStyle={true}
onValueChange={(value) => {
setComp(value);
}}
style={pickerStyle}
placeholder={{
label: 'Select item',
value: comp,
}}
items={companies}
doneText="Valider"
/>
https://github.com/lawnstarter/react-native-picker-select
You need to add a 'value' property. Adding the value property helps the picker to find and show the selected value. Something like this:
Also, your placeholder value should be null, not equal to the state value.