title: Action Creator return undefined axios
body: <p>Can successfully register the user using my action creator but it returns undefined. I think it's the way how am returning my dispatch</p>
  <p>axiosInstance</p>
  <pre><code>import axios from 'axios';
  import AsyncStorage from '@react-native-community/async-storage';
  // import base url
  import {API_URL} from '../constants';
  
  const instance = axios.create({
      baseURL: API_URL,
      timeout: 2000,
  
  });
  
  instance.interceptors.request.use(
      async(config) =&gt; {
          const token = await AsyncStorage.getItem('token');
          if(token) {
              config.headers.Autherization = `${token}`;
          }
          return config;
      },`enter code here`
      (err) =&gt; {
          return Promise.reject(err);
      }
  )
  
  
  export default instance;
  </code></pre>
  <p>SignUP Action.</p>
  <pre><code>import axiosInstance from '../../api/axiosInstance';
  import {REGISTER_USER_SUCCESS, REGISTER_USER_FAIL} from '../actionTypes/index';
  
  const registerSuccess = (payload) =&gt; {
      return{
          type: REGISTER_USER_SUCCESS,
          data: payload
      }
  };
  
  const registerError = (payload) =&gt; {
      return {
          type: REGISTER_USER_FAIL,
          data: payload
      }
  };
  
  export const SignUp = (registerData) =&gt; async dispatch =&gt; {
      axiosInstance.post('/users/register', registerData)
        .then((response)=&gt; {
          dispatch(registerSuccess(response.data));
        })
        .catch((error) =&gt; {
          dispatch(registerError(error));
        });
  }
  
  </code></pre>
  <p>Here is how am using my action creator .. the result is undefined . I want to have a check some that I can redirect the screen to another login screen or home screen</p>
  <p>SignUP Submit function</p>
  <pre><code>      dispatch(registerAction.SignUp(values))
          .then( (result) =&gt; {
            console.log('klhadsghaj',result.status);
            if(result.success) {
              try {
                navData.navigation.navigate(&quot;Login&quot;);
              }catch (err) {
                console.log(err)
              }
  
            } else {
              Alert.alert('Registration failed. Try Again')
            }   
          })
          .catch(err =&gt; console.log(err)) 
  </code></pre>