lifecycle.ts — vue Source File
Architecture documentation for lifecycle.ts, a typescript file in the vue codebase. 21 imports, 7 dependents.
Entity Profile
Dependency Diagram
graph LR d937f76e_061f_a631_9587_336503c9a15c["lifecycle.ts"] 81a11719_3457_ecad_7c86_c586d804debb["config.ts"] d937f76e_061f_a631_9587_336503c9a15c --> 81a11719_3457_ecad_7c86_c586d804debb 093a7a23_fa4b_6464_b268_8f9d10bcaa2f["watcher.ts"] d937f76e_061f_a631_9587_336503c9a15c --> 093a7a23_fa4b_6464_b268_8f9d10bcaa2f f4608dd9_26eb_0122_6979_8fe915792d8a["perf.ts"] d937f76e_061f_a631_9587_336503c9a15c --> f4608dd9_26eb_0122_6979_8fe915792d8a 52e70123_85d8_4258_eaf3_a7a0731a5968["mark"] d937f76e_061f_a631_9587_336503c9a15c --> 52e70123_85d8_4258_eaf3_a7a0731a5968 51edb677_f952_7062_365b_064cd93a29f4["measure"] d937f76e_061f_a631_9587_336503c9a15c --> 51edb677_f952_7062_365b_064cd93a29f4 5164a61d_92b2_9c7f_8acb_b18093afdb59["vnode.ts"] d937f76e_061f_a631_9587_336503c9a15c --> 5164a61d_92b2_9c7f_8acb_b18093afdb59 8c1ef0ac_57c2_7f8a_7ea7_6924e38bf16b["events.ts"] d937f76e_061f_a631_9587_336503c9a15c --> 8c1ef0ac_57c2_7f8a_7ea7_6924e38bf16b 6c50385e_3899_8a29_64e2_f9413ff2ef02["updateComponentListeners"] d937f76e_061f_a631_9587_336503c9a15c --> 6c50385e_3899_8a29_64e2_f9413ff2ef02 d1e549a1_8d2d_9fe4_1d06_3f7035b5e697["resolve-slots.ts"] d937f76e_061f_a631_9587_336503c9a15c --> d1e549a1_8d2d_9fe4_1d06_3f7035b5e697 104d091a_5520_5f91_df65_4a79135c9791["resolveSlots"] d937f76e_061f_a631_9587_336503c9a15c --> 104d091a_5520_5f91_df65_4a79135c9791 af395f8e_1ac5_a239_71b7_fd29a1c03d2c["index.ts"] d937f76e_061f_a631_9587_336503c9a15c --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c c9e94feb_048a_387e_29a1_1567a76d119c["toggleObserving"] d937f76e_061f_a631_9587_336503c9a15c --> c9e94feb_048a_387e_29a1_1567a76d119c e5c4d6ab_2495_a6d4_d962_9d9f71bf3114["dep.ts"] d937f76e_061f_a631_9587_336503c9a15c --> e5c4d6ab_2495_a6d4_d962_9d9f71bf3114 d9fae33f_7845_7289_de16_bee11c7f60e1["pushTarget"] d937f76e_061f_a631_9587_336503c9a15c --> d9fae33f_7845_7289_de16_bee11c7f60e1 style d937f76e_061f_a631_9587_336503c9a15c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import config from '../config'
import Watcher, { WatcherOptions } from '../observer/watcher'
import { mark, measure } from '../util/perf'
import VNode, { createEmptyVNode } from '../vdom/vnode'
import { updateComponentListeners } from './events'
import { resolveSlots } from './render-helpers/resolve-slots'
import { toggleObserving } from '../observer/index'
import { pushTarget, popTarget } from '../observer/dep'
import type { Component } from 'types/component'
import type { MountedComponentVNode } from 'types/vnode'
import {
warn,
noop,
remove,
emptyObject,
validateProp,
invokeWithErrorHandling
} from '../util/index'
import { currentInstance, setCurrentInstance } from 'v3/currentInstance'
import { getCurrentScope } from 'v3/reactivity/effectScope'
import { syncSetupProxy } from 'v3/apiSetup'
export let activeInstance: any = null
export let isUpdatingChildComponent: boolean = false
export function setActiveInstance(vm: Component) {
const prevActiveInstance = activeInstance
activeInstance = vm
return () => {
activeInstance = prevActiveInstance
}
}
export function initLifecycle(vm: Component) {
const options = vm.$options
// locate first non-abstract parent
let parent = options.parent
if (parent && !options.abstract) {
while (parent.$options.abstract && parent.$parent) {
parent = parent.$parent
}
parent.$children.push(vm)
}
vm.$parent = parent
vm.$root = parent ? parent.$root : vm
vm.$children = []
vm.$refs = {}
vm._provided = parent ? parent._provided : Object.create(null)
vm._watcher = null
vm._inactive = null
vm._directInactive = false
vm._isMounted = false
vm._isDestroyed = false
vm._isBeingDestroyed = false
}
// ... (362 more lines)
Domain
Subdomains
Functions
Dependencies
- apiSetup
- component
- config.ts
- currentInstance
- dep.ts
- effectScope
- events.ts
- index.ts
- index.ts
- mark
- measure
- perf.ts
- popTarget
- pushTarget
- resolve-slots.ts
- resolveSlots
- toggleObserving
- updateComponentListeners
- vnode
- vnode.ts
- watcher.ts
Imported By
Source
Frequently Asked Questions
What does lifecycle.ts do?
lifecycle.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, Instance subdomain.
What functions are defined in lifecycle.ts?
lifecycle.ts defines 9 function(s): activateChildComponent, callHook, deactivateChildComponent, initLifecycle, isInInactiveTree, lifecycleMixin, mountComponent, setActiveInstance, updateChildComponent.
What does lifecycle.ts depend on?
lifecycle.ts imports 21 module(s): apiSetup, component, config.ts, currentInstance, dep.ts, effectScope, events.ts, index.ts, and 13 more.
What files import lifecycle.ts?
lifecycle.ts is imported by 7 file(s): create-component.ts, index.ts, init.ts, patch.ts, render.ts, scheduler.ts, state.ts.
Where is lifecycle.ts in the architecture?
lifecycle.ts is located at src/core/instance/lifecycle.ts (domain: VueCore, subdomain: Instance, directory: src/core/instance).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free