MCPcopy
hub / github.com/vuejs/core / setup

Function setup

packages/runtime-core/__tests__/hmr.spec.ts:440–452  ·  packages/runtime-core/__tests__/hmr.spec.ts::setup
()

Source from the content-addressed store, hash-verified

438
439 const Parent: ComponentOptions = {
440 setup() {
441 const com1 = ref()
442 const changeRef1 = (value: any) => (com1.value = value)
443
444 const com2 = ref()
445 const changeRef2 = (value: any) => (com2.value = value)
446
447 return () => [
448 h(Child, { ref: changeRef1 }),
449 h(Child, { ref: changeRef2 }),
450 com1.value?.count,
451 ]
452 },
453 }
454
455 render(h(Parent), root)

Callers

nothing calls this directly

Calls 3

hFunction · 0.85
refFunction · 0.70
nextTickFunction · 0.50

Tested by

no test coverage detected