title: React Native switch - save value as “Yes” / “No” instead of “true” / “false” in database
body: <p>I want to save the switch value as <strong>"Yes" / "No"</strong> instead of <strong>"true" / "false"</strong> in database. Amenter code here using react native to fetching the values and storing in the database.</p>
  
  <p>Please find my below code, that am trying.</p>
  
  <pre><code>this.state = {
  
  colorFalseSwitchIsOn: false,
  
  }
  this.changeSwitch=this.changeSwitch.bind(this);
  
  }
  changeSwitch=(value)=&gt;{
  
   this.setState({colorFalseSwitchIsOn:value?"Yes":"No"})
  
  
  
  
  }
    render() {
  
  
  return (
    &lt;View&gt;
  
      &lt;Switch
        onValueChange={(value) =&gt; {
          this.changeSwitch(value);}}
        onTintColor="#00ff00"
        style={{marginBottom: 10}}
        thumbTintColor="#0000ff"
        tintColor="#ff0000"
        value={this.state.colorFalseSwitchIsOn}
        {...this.props}/&gt;
  
  
    &lt;/View&gt;
  );
  }
  </code></pre>