This is the Vue 3 playground. You can find vue3 features here.

composition api

Base setup

Example

Bob

He is lazy and say nothing... This is other info.

Summary

  • props cannot be destructed
  • attrs is equal to this.$attrs
  • slots is equal to this.$slots
  • emit is equal to this.$emit
  • The props, slots and attrs objects here are proxies, so they will always be pointing to the latest values when used in render functions.
  • props data can be resolved in template

Setup return render

Example

Danny

Summary

  • you can return a VNode in setup function

Reactive

Example

    Summary

    • You can make an object creative using Vue.creative
    • New property added on creative object is also creative.

      Any change to new property can trigger update of view.

    Multiple vModels

    Base use

    Example

    Name: LeBron
    Age: 19

    This is modelValue, it's default model bind prop.

    Summary

    • You can only use v-model on an element
    • You can add argument in v-model O=on a component