Introduction To Vue Composition API

vue create composition-api-project
cd composition-api-project
npm run serve
<TraditionalVueComponent :sampleWords="sampleWords" />

Setup Function

Case: Props

Case: Data

let dataObject=refs(initialValue)

Case: Methods

function func() { //do whatever in code}

Case: Watchers

watch(dataObject, (newValue) => (totalObject.value += newValue))

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store