createRef() — vue Function Reference
Architecture documentation for the createRef() function in ref.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 72a537aa_86c4_d26a_0519_7cc9c411ad45["createRef()"] 22b44e72_ad0a_6a98_e36a_e325291fd02b["ref.ts"] 72a537aa_86c4_d26a_0519_7cc9c411ad45 -->|defined in| 22b44e72_ad0a_6a98_e36a_e325291fd02b a1450db6_2efb_6cd1_7916_61560cb0b2f5["ref()"] a1450db6_2efb_6cd1_7916_61560cb0b2f5 -->|calls| 72a537aa_86c4_d26a_0519_7cc9c411ad45 2f1a9edb_d3ed_0150_0854_de7f9f4691e2["shallowRef()"] 2f1a9edb_d3ed_0150_0854_de7f9f4691e2 -->|calls| 72a537aa_86c4_d26a_0519_7cc9c411ad45 f264de96_ce30_ab7e_6f2f_bd7a1a19804f["isRef()"] 72a537aa_86c4_d26a_0519_7cc9c411ad45 -->|calls| f264de96_ce30_ab7e_6f2f_bd7a1a19804f style 72a537aa_86c4_d26a_0519_7cc9c411ad45 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/v3/reactivity/ref.ts lines 62–75
function createRef(rawValue: unknown, shallow: boolean) {
if (isRef(rawValue)) {
return rawValue
}
const ref: any = {}
def(ref, RefFlag, true)
def(ref, ReactiveFlags.IS_SHALLOW, shallow)
def(
ref,
'dep',
defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering())
)
return ref
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does createRef() do?
createRef() is a function in the vue codebase, defined in src/v3/reactivity/ref.ts.
Where is createRef() defined?
createRef() is defined in src/v3/reactivity/ref.ts at line 62.
What does createRef() call?
createRef() calls 1 function(s): isRef.
What calls createRef()?
createRef() is called by 2 function(s): ref, shallowRef.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free