Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.65 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.65 KB

Vue 3 Composition API

This repository contains the example code for the Vue 3 Composition API course.

Vue 3 introduced the Composition API as an alternative method to the Options API for writing component state and logic. In this course, we cover everything you need to know: from the basics to real world scenarios. Learn the Vue.js 3 Composition API from top to bottom including topics like:

  • How to start using the Composition API
  • What is a ref?
  • What's the difference between ref and reactive?
  • Accessing props, attrs, slots, and the emit function
  • Watching data and reacting to changes
  • Using lifecycle hooks
  • Using provide/inject
  • Eliminating boilerplate with the setup attribute
  • Using async/await in setup
  • Writing reusable composables
  • Using composables for global state management
  • and more!

Requirements You should be familiar with JavaScript, basic ES6 like arrow functions and import statements, and have fundamental knowledge of Vue.js and the options API.

If you are just starting out with Vue.js, we suggest that you watch our free course Vue.js 3 Fundamentals and browse around our other beginner courses before diving into the Vue Composition API. If you are looking to brush up your ES6 skills, watch our course Modern JavaScript: ES6 and beyond.

Enroll at Vue School to watch this course!

Build Setup

# Run development server
npm run dev

# Build for production
npm run build

# Run preview production server after build
npm run serve