title: How use import async function?
body: <p>I made a <code>Storage.js</code> file with some Utils function. In most case, I use it in this way:</p>
  
  <pre><code>async someFunction()=&gt;{ let foo = await getOnDevice(someName)}
  </code></pre>
  
  <p>But the in my case, I have a problem with the syntax</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import {AsyncStorage} from 'react-native'
  
  export const saveOnDevice = async (name, data) =&gt; {
   try {
    if (data !== null &amp;&amp; data !== undefined) {
     await  AsyncStorage.setItem(name, JSON.stringify(data));
    }
   } catch (error) {
    console.log(error)
   }
  };
  
  export const getOnDevice = async (name) =&gt; {
   try {
    const data = await AsyncStorage.getItem(name);
    if (data !== null &amp;&amp; data !== undefined) {
     return data
    }
   } catch (error) {
    console.log(error)
   }
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I use it without declaring an <code>async</code> function?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import {saveOnDevice} from '../../utils/Storage'
  export  function fetchUrlWithRedux(url) {
   return (dispatch) =&gt; {
    dispatch(fetchUrlRequest(url));
    return fetchUrl(url, dispatch).then(([response, json]) =&gt; {
     if (response.status === 200) {
      saveOnDevice('url', json.data.host);
      dispatch(fetchUrlSuccess(json))
     }
     else {
      dispatch(fetchUrlError())
     }
    }).catch(() =&gt; dispatch(fetchUrlError()))
   }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>What is wrong with my code?</p>