title: How to use async / await in Chrome or Edge mobile browser?
body: <p>I've completed my first JavaScript course and am now following a course on React. I've created a simple backend using Express and MongoDB.</p>
  <p>I've created a frontend using npx create-react-app, added axios to communicate with the backend and am using antd for the UI. So far so good! The following code works on my laptop running Windows 10 and Edge 94 to insert a new Year into MongoDB using a simple input:</p>
  <p>Client uses:</p>
  <pre><code>  const onFinish = async (values) =&gt; {
      await api.createYear(values).then((res) =&gt; {
        console.log(&quot;onFinish&quot;, values);
        console.log(res);
      });
    };
  </code></pre>
  <p>API uses:</p>
  <pre><code>import axios from 'axios'
  
  const api = axios.create({
      baseURL: 'http://localhost:3000/api/v1',
  })
  
  export const createYear = values =&gt; api.post(`/year`, values)
  
  </code></pre>
  <p>Server (controller) uses:</p>
  <pre><code>const Year = require('../models/year-model')
  
  createYear = (req, res) =&gt; {
      const body = req.body
      if (!body) {
          return res.status(400).json({
              success: false,
              error: 'You must provide a year!',
          })
      }
      const year = new Year(body)
      if (!year) {
          return res.status(400).json({ success: false, error: err })
      }
      year
          .save()
          .then(() =&gt; {
              return res.status(201).json({
                  success: true,
                  id: year._id,
                  message: 'Year created!',
              })
          })
          .catch(error =&gt; {
              return res.status(400).json({
                  error,
                  message: 'Year not created!',
              })
          })
  }
  </code></pre>
  <p>Server (model) uses:</p>
  <pre><code>const mongoose = require('mongoose')
  const Schema = mongoose.Schema
  
  const yearSchema = new Schema(
      {
          year: { type: Number, required: true }
      },
      { timestamps: false },
  )
  
  module.exports = mongoose.model('Year', yearSchema)
  </code></pre>
  <p>However, the same code does not work on my Samsung Galaxy S21 using Edge 93 and Chrome 94. Based on what I found so far, this could be caused by this browser not supporting async/await (ES2017 feature). This could probably be resolved by Babel?</p>
  <p>I'm sorry that this part is pretty vague: the information I found is a kind of overwhelming considering my limited experience and all variables involved (React version, Babel version, Babel plugins, Webpack etc). I would gladly provide more information if you could point me in the right direction.</p>
  <p>Could anyone perhaps tell me if and how I should change Babel or Webpack to make async/await work in mobile browsers?</p>