Computer scienceFrontendVue.jsVue 3 SyntaxVue Instance

Creating a Vue instance

Attaching the Vue instance

Report a typo

Look at the code below. You need to attach the Vue instance to div with id="main". Write the relevant missing code in the answer, using app.mount syntax.

<!DOCTYPE html>
<html>
<head>
  <title>My First Vue App</title>
</head>
<body>
  <div id="main"></div>

  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.min.js"></script>
  <script>
    const app = Vue.createApp({
      setup() {}
    });

    // missing code
  </script>
</body>
</html>
Enter a short text

Create a free account to access the full topic