If you want to create a picker component with a prompt message in React Native then this is the right place to look for.
The Picker component will be removed from react native core and hence install Picker from react native community using the following command.
npm install @react-native-picker/picker --save
yarn add @react-native-picker/picker
For iOS users, execute the following command too.
Creating a picker component with a prompt is pretty simple, all you need is to add a prompt prop to the picker component and assign your message to it. Still, have doubts? just have a look at the example given below.
Following is the output of the above example.
That’s how you add the Picker component with a prompt message in react native.