github vuejs/composition-api v0.6.0

latest releases: v1.7.2, v1.7.1, v1.7.0...
3 years ago

Great thanks to @pikax for #311, making most of the APIs better aligned with the latest vue-next.

BREAKING CHANGE

  • The lazy option of watch has been replaced by the opposite immediate option, which defaults to false. (It's ignored when using the effect signature). more details (#266)
  • Rename nonReactive to markRaw
  • watchEffect now follows the same behaviour as v3 (triggers immediately).
  • UnwrapRef types from vue-next this can cause some incompatibilities.

Bug Fixes

  • Added missing reactivity API from vue-next, #311, @pikax
  • Fix return type of toRefs, #315
  • Fix incorrect ref typing, #344, @antfu
  • Binding context vm when using function without parentheses, #148, @pikax
  • computed: destroy helper vm of computed to prevent memleak, #277, @LinusBorg
  • Remove the surplus Function type from PropType, #352, @pikax

Features

  • Added unref(#309), isReactive (#327), toRef (#313), UnwrapRef (#247)
  • Added shallowReactive, shallowRef
  • Added toRaw
  • getCurrentInstance available on the lifecycle hooks (onMounted, etc)
  • getCurrentInstance returns undefined when called outside setup instead of throwing exception

Types

  • Align reactivity types with vue-next

Don't miss a new composition-api release

NewReleases is sending notifications on new releases.