// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`comile > bindings 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, createTextNode, insert, setText } from 'vue/vapor';
+"import { template, children, createTextNode, insert, effect, setText } from 'vue/vapor';
const t0 = template('<div>count is <!>.</div>');
export function render() {
const n0 = t0();
} = children(n0);
const n1 = createTextNode(count.value);
insert(n1, n3, n2);
- watchEffect(() => {
+ effect(() => {
setText(n1, undefined, count.value);
});
return n0;
`;
exports[`comile > directives > v-bind > simple expression 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, setAttr } from 'vue/vapor';
+"import { template, children, effect, setAttr } from 'vue/vapor';
const t0 = template('<div></div>');
export function render() {
const n0 = t0();
const {
0: [n1],
} = children(n0);
- watchEffect(() => {
+ effect(() => {
setAttr(n1, 'id', undefined, id.value);
});
return n0;
`;
exports[`comile > directives > v-html > no expression 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, setHtml } from 'vue/vapor';
+"import { template, children, effect, setHtml } from 'vue/vapor';
const t0 = template('<div></div>');
export function render() {
const n0 = t0();
const {
0: [n1],
} = children(n0);
- watchEffect(() => {
+ effect(() => {
setHtml(n1, undefined, '');
});
return n0;
`;
exports[`comile > directives > v-html > simple expression 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, setHtml } from 'vue/vapor';
+"import { template, children, effect, setHtml } from 'vue/vapor';
const t0 = template('<div></div>');
export function render() {
const n0 = t0();
const {
0: [n1],
} = children(n0);
- watchEffect(() => {
+ effect(() => {
setHtml(n1, undefined, code.value);
});
return n0;
`;
exports[`comile > directives > v-on > simple expression 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, on } from 'vue/vapor';
+"import { template, children, effect, on } from 'vue/vapor';
const t0 = template('<div></div>');
export function render() {
const n0 = t0();
const {
0: [n1],
} = children(n0);
- watchEffect(() => {
+ effect(() => {
on(n1, 'click', handleClick);
});
return n0;
`;
exports[`comile > directives > v-once > as root node 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, setAttr } from 'vue/vapor';
+"import { template, children, effect, setAttr } from 'vue/vapor';
const t0 = template('<div></div>');
export function render() {
const n0 = t0();
const {
0: [n1],
} = children(n0);
- watchEffect(() => {
+ effect(() => {
setAttr(n1, 'id', undefined, foo);
});
return n0;
`;
exports[`comile > directives > v-text > no expression 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, setText } from 'vue/vapor';
+"import { template, children, effect, setText } from 'vue/vapor';
const t0 = template('<div></div>');
export function render() {
const n0 = t0();
const {
0: [n1],
} = children(n0);
- watchEffect(() => {
+ effect(() => {
setText(n1, undefined, '');
});
return n0;
`;
exports[`comile > directives > v-text > simple expression 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, setText } from 'vue/vapor';
+"import { template, children, effect, setText } from 'vue/vapor';
const t0 = template('<div></div>');
export function render() {
const n0 = t0();
const {
0: [n1],
} = children(n0);
- watchEffect(() => {
+ effect(() => {
setText(n1, undefined, str.value);
});
return n0;
`;
exports[`comile > dynamic root 1`] = `
-"import { watchEffect } from 'vue';
-import { fragment, createTextNode, append, setText } from 'vue/vapor';
+"import { fragment, createTextNode, append, effect, setText } from 'vue/vapor';
export function render() {
const t0 = fragment();
const n0 = t0();
const n1 = createTextNode(1);
const n2 = createTextNode(2);
append(n0, n1, n2);
- watchEffect(() => {
+ effect(() => {
setText(n1, undefined, 1);
});
- watchEffect(() => {
+ effect(() => {
setText(n2, undefined, 2);
});
return n0;
`;
exports[`comile > static + dynamic root 1`] = `
-"import { watchEffect } from 'vue';
-import { template, children, createTextNode, prepend, insert, append, setText } from 'vue/vapor';
+"import { template, children, createTextNode, prepend, insert, append, effect, setText } from 'vue/vapor';
const t0 = template('3<!>6<!>9');
export function render() {
const n0 = t0();
insert([n3, n4], n0, n9);
insert([n5, n6], n0, n10);
append(n0, n7, n8);
- watchEffect(() => {
+ effect(() => {
setText(n1, undefined, 1);
});
- watchEffect(() => {
+ effect(() => {
setText(n2, undefined, 2);
});
- watchEffect(() => {
+ effect(() => {
setText(n3, undefined, 4);
});
- watchEffect(() => {
+ effect(() => {
setText(n4, undefined, 5);
});
- watchEffect(() => {
+ effect(() => {
setText(n5, undefined, 7);
});
- watchEffect(() => {
+ effect(() => {
setText(n6, undefined, 8);
});
- watchEffect(() => {
+ effect(() => {
setText(n7, undefined, 'A');
});
- watchEffect(() => {
+ effect(() => {
setText(n8, undefined, 'B');
});
return n0;