Using async and await with export const : <p>I can't make this work...it's says: await is a reserved word. Yes, of course it is...and I'd like to use :) </p>

<p>What's wrong ?</p>

<pre><code>export const loginWithToken = async () =&gt; {
  return dispatch =&gt; {
    dispatch({type: SESSION_LOGIN_IN_PROGRESS, payload: true})
    let storedData = await ReadFromLocalDB('user')
    console.log(storedData)
    if (!storedData) {
        invalidToken(null, dispatch)
    }
    else {
        storedData = JSON.parse(storedData)
        SessionLoginWithToken(storedData.session.token).then(res =&gt; {
            console.log(res)
            loginSuccessfully(res, dispatch, true)
        })
    }
  }
}
</code></pre>

<p>My ReadFromLocalDB is this:</p>

<pre><code>export const ReadFromLocalDB = async (key) =&gt; {
   return AsyncStorage.getItem(key)
}
</code></pre>

<p>it's return a promise</p>
