title: Undefined is not an object (evaluating 'res.data'). What is this?
body: <p>I need to post data from a user to my database (firebase), but when I click on Touchable Opacity, my app returns this error:
  Single Ocurrence
  Possible Unhandled Promise rejection (id:0): TypeError: undefined is not an object (evaluating 'res.data'</p>
  
  <p>My code:</p>
  
  <pre><code>import {USER_LOGGED_IN, USER_LOGGED_OUT } from './actionTypes'
  import axios from 'axios'
  
  const authBaseURL ='https://www.googleapis.com/identitytoolkit/v3/relyingparty'
  const API_KEY ='my api key is here'
  
  export const login = user =&gt; {
    return {
      type: USER_LOGGED_IN,
      payload: user
    }
  } 
  export const logout = () =&gt; {
    return {
      type: USER_LOGGED_OUT
    }
  }
  
  export const createUser = user =&gt; {
    return dispatch =&gt; {
      axios.post (`${authBaseURL}/signupNewUser?key=${API_KEY}`, {
        email: user.email,
        password: user.password,
        returnSecureToken:true
      })
       .catch(err =&gt; console.log(err))
       .then (res =&gt; {
         if (res.data.localId) {
           axios.put(`/users/${res.data.localId}.json`, {
             name: user.name,
             tipouser: user.tipouser,
             telcelular: user.telcelular,
             telfixo: user.telfixo,
             facebookuser: user.facebookuser,
             instagramuser: user.instagramuser
  
           })
            .catch(err =&gt; console.log(err))
            .then(res =&gt; {
              console.log('Usuário criado com sucesso')
            })
         }
       })
    }
  }
  </code></pre>
  
  <p>react-native: 0.60.4
  axios: 0.19.0
  react-redux: 7.1.1
  redux: 4.0.4"</p>