Quantcast
Channel: React Native apply array values from state as Picker items - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Dmitry Preeternal for React Native apply array values from state as...

corrected a couple of syntax errors {options.map((item, index) => { return (< Picker.Item label={item} value={index} key={index} />); })}

View Article



Answer by Manjeet Singh for React Native apply array values from state as...

You don't need to use listview within picker var options ={ "1": "Home", "2": "Food", "3": "Car", "4": "Bank", }; <Picker style={{your_style}} mode="dropdown" selectedValue={this.state.selected}...

View Article

React Native apply array values from state as Picker items

I have an array in my state named Categories. These are its values: ['Food', 'Home', 'Savings']. My goal is that I need them to be rendered as Picker.items for my user to select. How is that possible?...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images