Composition-api: Created and Destroyed events alternatives

Created on 27 Aug 2019  路  1Comment  路  Source: vuejs/composition-api

Do onActivated and onDeactivated replaces onCreated and onDestroyed?

question

Most helpful comment

https://vue-composition-api-rfc.netlify.com/api.html#lifecycle-hooks

Mapping between 2.x Lifecycle Options and Composition API

beforeCreate -> use setup()
created -> use setup()
beforeMount -> onBeforeMount
mounted -> onMounted
beforeUpdate -> onBeforeUpdate
updated -> onUpdated
beforeDestroy -> onBeforeUnmount
destroyed -> onUnmounted
errorCaptured -> onErrorCaptured

>All comments

https://vue-composition-api-rfc.netlify.com/api.html#lifecycle-hooks

Mapping between 2.x Lifecycle Options and Composition API

beforeCreate -> use setup()
created -> use setup()
beforeMount -> onBeforeMount
mounted -> onMounted
beforeUpdate -> onBeforeUpdate
updated -> onUpdated
beforeDestroy -> onBeforeUnmount
destroyed -> onUnmounted
errorCaptured -> onErrorCaptured

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spaceemotion picture spaceemotion  路  6Comments

sapphi-red picture sapphi-red  路  4Comments

rchaser53 picture rchaser53  路  4Comments

swuecho picture swuecho  路  4Comments

TooBug picture TooBug  路  6Comments