8 changes: 6 additions & 2 deletions 8 packages/reactivity-transform/src/core/transform.ts Original file line numberDiff line numberDiff line change @@ -1,8 +1,12 @@ import { parse, type ParserPlugin } from '@
reactivityTransform feature from Vue Macros.. Latest version: 3.0.0-beta.12, last published: 18 days ago. Start using @vue-macros/reactivity-transform in your project by running `npm i @vue-macros/reactivity-transform`. There are 9 other projects in the
It's easy to lose reactivity when destructuring reactive objects, while it can be cumbersome to use `.value` everywhere when using refs. Also, `.value` is easy to miss if not using a type system. Reactivity Transform is a compile-time transform that allows us to write code like this: ...
vue-macros.devvue-macros/vue-macros@vue-macros/reactivity-transform Use it $ yarn add @vue-macros/reactivity-transformcopy Try in RunKit· Browse Files CDNs jsDelivr cdn.jsdelivr.net/npm/@vue-macros/reactivity-transform/ unpkg unpkg.com/@vue-macros/reactivity-transform/ bundle.run bundle.run/@...
4. # Reactivity Transform:减少了对 Ref 的使用,减轻了开发者在管理响应式数据时的心智负担,使代码更加简洁和易于理解。5. defineRender:通过引入 JSX 样式,使 Vue 更接近 React 的编程风格,使得渲染函数更加直观和易用。6. setupComponent 和 setupSFC:提供了一种完全拥抱 JSX 的方式,使 Vue...
@vue-macros/hoist-static @vue-macros/jsx-directive @vue-macros/named-template @vue-macros/reactivity-transform @vue-macros/script-lang @vue-macros/setup-block @vue-macros/setup-component @vue-macros/setup-sfc @vue-macros/short-bind @vue-macros/short-emits ...
我在那条推文下面问了下,能不能支持 ref sugar take 2(也就是现在的 Reactivity Transform),得到回复说等这个提案稳定了再做(结果现在都 2023 了,Vue 2.7 都发布了,Reactivity Transform 还没稳定 )。我当时感觉到这个提案遥遥无期(果然吧 ),就自己提了一个 PR 把这个功能做了。后来 Anthony 发了个推特 at...
const{modelValue, count} = defineProps(['modelValue','count'])// loses reactivity And the only way around this is usually to assign a variable to all the props in the component and then wrap the prop around a computed property:
ReactivityTransform(), /** * defineProps * @description 使用 $defineProps 可以正确地解构 props 的类型 * @see https://vue-macros.sxzz.moe/zh-CN/macros/define-props.html */ DefineProps(), /** * definePropsRefs * @description 从 defineProps 中将返回 refs 而不是 reactive 对象,可以在不丢失...
Explore and extend more macros and syntax sugar to Vue. - fix(macros): reactivity-transform should be executed after jsx-directive · vue-macros/vue-macros@d7b12a6