0👍
In contrast to React refs that have current
property, Vue composition API refs have value
property.
It should be:
const refLatest = ref(num)
refLatest.value = num.value
and
expect(isRef(current1)).toBe(true)
expect(current1.value).toBe(0)
And the mistake could be detected at compilation time by using the correct type:
const useLatest = <T>(num: T): Ref<T> => {
- [Vuejs]-Issue with CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. NET Core 3.1
- [Vuejs]-Laravel + Vue integration. Vuetify don't work
Source:stackexchange.com