SyntaxStudy
Sign Up
Vue.js Beginner 8 min read

What is Vue.js?

Vue.js is a progressive JavaScript framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed to be incrementally adoptable. The core library focuses on the view layer only, making it easy to integrate with other projects.

Vue was created by Evan You in 2014 and has grown into one of the most popular front-end frameworks, known for its gentle learning curve and elegant syntax.

Example
<!-- Simple Vue.js app -->
<!DOCTYPE html>
<html>
<head>
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
  <div id="app">
    <h1>{{ message }}</h1>
    <button @click="greet">Click Me</button>
  </div>

  <script>
    const { createApp } = Vue
    createApp({
      data() {
        return { message: 'Hello Vue!' }
      },
      methods: {
        greet() {
          this.message = 'You clicked the button!'
        }
      }
    }).mount('#app')
  </script>
</body>
</html>