title: I am using 'react-native-dropdown-picker'; I want to show values from sqlite db to dropdown in react native, How do i do that?
body: <pre><code>constructor() {
     super();
      this.state = {
        highcourtname: [],
      }
    }
  
    getFromDatabase = () =&gt; {
  
      var that = this;
      db.transaction((tx) =&gt; {
        tx.executeSql('SELECT Distinct(Court_Name) FROM court_images', [], (tx, results) =&gt; {
          var len = results.rows.length;
          if (len &gt; 0) {
            for (let i = 0; i &lt; len; i++) {
              let rowall = results.rows.item(i);
              console.log(rowall);
              //this.setState({highcourtname: rowall.name})
            }
  
          }
        });
      });
    }
  
  &lt;DropDownPicker
      items={[
          {label: 'UK', value: 'uk'},
          {label: 'France', value: 'france'},
      ]} //how to get rowall value here??
  
      defaultValue={this.state.highcourtname}
      onChangeItem={item =&gt; this.setState({
          highcourtname: item.value
      })}
  /&gt;
  
  </code></pre>
  <p>I have used DropDown from  'react-native-dropdown-picker';
  I want to display values from my sqlite db to dropview in react native.
  I am getting values from sqlite db, have console.log and checked it but dont know how to show in dropdown items above.</p>
  <p>How to show &quot;rowall&quot; values in Items Dropdown???</p>
  <p>How do I do that? If anybody could please help .</p>
  <p>I am new in react native developement..</p>