title: React Native atob() / btoa() not working without remote JS debugging
body: <p>I have a testing app in react native, and all works fine when I have enabled the debug js remotely. It works fine in device (from XCode) and simulator, after run:</p>
  
  <pre><code>react-native run ios
  </code></pre>
  
  <p>The problem is that if I stop remote js debugging, the login test not works anymore.The login logic is very simple, I'm making a fetch to an api to test a login, the API endpoint is over https. </p>
  
  <p>What I need to change?</p>
  
  <p><strong>Updated: This code works perfetly with JS Debug Remote Enabled, if I disable it, it not works anymore.</strong></p>
  
  <pre><code>/**
   * Sample React Native App
   * https://github.com/facebook/react-native
   * @flow
   */
  
  import React, { Component } from 'react'
  import {
    AppRegistry,
    StyleSheet,      
    View,
    Button,
    Alert
  } from 'react-native'
  
  export default class MyClass extends Component {
  
    constructor (props) {
      super(props)
      this.testFetch = this.testFetch.bind(this)
    }
  
    async testFetch () {
      const email = 'email@example.com'
      const password = '123456'
  
      try {
        const response = await fetch('https://www.example.com/api/auth/login', {
          /* eslint no-undef: 0 */
          method: 'POST',
          headers: {
            'Accept': 'application/json' /* eslint quote-props: 0 */,
            'Content-Type': 'application/json',
            'Authorization': 'Basic ' + btoa(email + ':' + password)
          }
  
        })
        Alert.alert('Error fail!', 'Fail')
        console.log(response)
      } catch (error) {
        Alert.alert('Error response!', 'Ok')
      }
    }
  
    render () {
      return (
        &lt;View style={styles.container}&gt;            
          &lt;Button
            onPress={this.testFetch}
            title="Test me!"
  
          /&gt;            
        &lt;/View&gt;
      )
    }
  }
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      justifyContent: 'center',
      alignItems: 'center',
      backgroundColor: '#F5FCFF'
    },
    welcome: {
      fontSize: 20,
      textAlign: 'center',
      margin: 10
    },
    instructions: {
      textAlign: 'center',
      color: '#333333',
      marginBottom: 5
    }
  })
  
  AppRegistry.registerComponent('testingReactNative', () =&gt; MyClass)
  </code></pre>
  
  <p>Thanks.</p>