Last 12 weeks ยท 0 commits
2 of 6 standards met
Repository: vuejs/composition-api. Description: Composition API plugin for Vue 2 Stars: 4201, Forks: 342. Primary language: TypeScript. Languages: TypeScript (73.3%), JavaScript (26.7%). License: MIT. Homepage: https://composition-api.vuejs.org/ Latest release: v1.7.2 (2y ago). Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 37%. Top contributors: antfu, liximomo, pikax, webfansplz, ygj6, LinusBorg, posva, xiaoxiangmoe, edwardnyc, shaonialife and others.
TypeScript
In trying to transition to Vue 2.7 to then be able to transition to Vue3, _many_ dependencies rely on this package. it would be very helpful if instead of completely removing all support for 2.7, this is instead just a passthrough package for plain vue if vue is >= 2.7 like just this would allow updating dependencies piece by piece instead of needing to do it _all_ at once
The documentation stored here: https://vuejs.org/guide/essentials/watchers.html#watcheffect Suggests that can be used in place of . However this is not the case because callback does not support a return so TS will not allow compilation. If the page is saved while debugging, and the props have not changed, with the function that is supposedly "watched" automatically even though nothing has changed. The same does not happen with . For example take the example : https://gist.github.com/craigcrawfordcts/f4923edf768a01b11c9a055acf96f20a The following works, and does not re-fetch if you attempt to re-save the file but the props have not changed: However, none of the following work with because it does not support Promises. In this first example, the function is called every time I save a change in a vue file, but the above does not re-call it: This also does not work, as TS doesn't like the return: Can't use await since it's not an async, also not valid: So what if we make it an async? Nope... Only works. So how do we make automagically watch our props as the documentation states?