No exciting personal updates this week. However, I migrated my Nuxt Starter Kit to Nuxt UI v4 (alpha)! You can now use it without a Nuxt UI Pro license and get access to all Nuxt UI Pro components for free.
💡 Vue Tip: Getting the Previous Value of a Computed Property
Since Vue 3.4+ you can get the the previous value returned by the computed property accessing the first argument of the getter:
1<script setup>2import { ref, computed } from 'vue'34const count = ref(2)56// This computed will return the value of count when it's less or equal to 3.7// When count is >=4, the last value that fulfilled our condition will be returned8// instead until count is less or equal to 39const alwaysSmall = computed((previous) => {10 if (count.value <= 3) {11 return count.value12 }1314 return previous15})16</script>
👉🏻 The TC39 committee has advanced nine proposals, including the newly standardized explicit resource management feature using the using keyword for automatic cleanup, and Array.fromAsync for handling async iterables.