Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue 3 cdn example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
  </head>
  <body>
    <div id="app">
      <h1>Vue3</h1>
      <h2>{{name}}</h2>
    </div>
    <script>
      const { ref, createApp } = Vue;
      createApp({
        setup() {
          const name = ref("Sophea");

          return {
            name,
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
Source by github.com #
 
PREVIOUS NEXT
Tagged: #vue #cdn
ADD COMMENT
Topic
Name
5+7 =