Vue 3’s Composition API provides two main ways of declaring reactive data: ref and reactive. This tutorial will cover the following: ref, reactive and the pros and cons of each. Ref: To create a single reactive variable you can use ref . Reactive: Reactive can only be initialized with an object. The best option is to just use one or the other!
Table of contents
What is ref?ref value propertyWhat is reactive?Don't destructure reactiveref or reactive?1 Comment
Sort: