Home / File/ create-functional-component.ts — vue Source File

create-functional-component.ts — vue Source File

Architecture documentation for create-functional-component.ts, a typescript file in the vue codebase. 16 imports, 1 dependents.

File typescript VueCore Instance 16 imports 1 dependents 4 functions

Entity Profile

Dependency Diagram

graph LR
  414b37af_5f63_dee7_31a2_9a7cad5979ec["create-functional-component.ts"]
  5164a61d_92b2_9c7f_8acb_b18093afdb59["vnode.ts"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 5164a61d_92b2_9c7f_8acb_b18093afdb59
  4b23edff_adcb_6cfb_ca7d_b6d38b4a1921["create-element.ts"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 4b23edff_adcb_6cfb_ca7d_b6d38b4a1921
  02c4c5f0_14bc_07b8_fddc_e3511462f997["createElement"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 02c4c5f0_14bc_07b8_fddc_e3511462f997
  2951feab_0890_f54d_27c2_673dc66ea804["inject.ts"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 2951feab_0890_f54d_27c2_673dc66ea804
  ee505869_7e2d_eb58_154d_d7a4647b89dd["resolveInject"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> ee505869_7e2d_eb58_154d_d7a4647b89dd
  6a6aa84d_7f9a_89f4_4499_eb3dd1af08a8["normalize-children.ts"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 6a6aa84d_7f9a_89f4_4499_eb3dd1af08a8
  212af4c6_0b5a_ad92_f29b_9db0f5709d7f["normalizeChildren"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 212af4c6_0b5a_ad92_f29b_9db0f5709d7f
  d1e549a1_8d2d_9fe4_1d06_3f7035b5e697["resolve-slots.ts"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> d1e549a1_8d2d_9fe4_1d06_3f7035b5e697
  104d091a_5520_5f91_df65_4a79135c9791["resolveSlots"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 104d091a_5520_5f91_df65_4a79135c9791
  091d06a8_6793_746a_7499_d22a1d025196["normalize-scoped-slots.ts"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 091d06a8_6793_746a_7499_d22a1d025196
  e490d83e_fe82_d38d_a362_5157771a3160["normalizeScopedSlots"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> e490d83e_fe82_d38d_a362_5157771a3160
  8ffc8513_97a6_feaa_6bc2_e31c949e66cd["index.ts"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 8ffc8513_97a6_feaa_6bc2_e31c949e66cd
  d77f5342_b1e8_4d01_7f2b_c320dfa66cc5["installRenderHelpers"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> d77f5342_b1e8_4d01_7f2b_c320dfa66cc5
  76672dd6_4e87_4468_a48b_f4da793fd211["index.ts"]
  414b37af_5f63_dee7_31a2_9a7cad5979ec --> 76672dd6_4e87_4468_a48b_f4da793fd211
  style 414b37af_5f63_dee7_31a2_9a7cad5979ec fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import VNode, { cloneVNode } from './vnode'
import { createElement } from './create-element'
import { resolveInject } from '../instance/inject'
import { normalizeChildren } from '../vdom/helpers/normalize-children'
import { resolveSlots } from '../instance/render-helpers/resolve-slots'
import { normalizeScopedSlots } from '../vdom/helpers/normalize-scoped-slots'
import { installRenderHelpers } from '../instance/render-helpers/index'

import {
  isDef,
  isTrue,
  hasOwn,
  isArray,
  camelize,
  emptyObject,
  validateProp
} from '../util/index'
import type { Component } from 'types/component'
import type { VNodeData } from 'types/vnode'

export function FunctionalRenderContext(
  data: VNodeData,
  props: Object,
  children: Array<VNode> | undefined,
  parent: Component,
  Ctor: typeof Component
) {
  const options = Ctor.options
  // ensure the createElement function in functional components
  // gets a unique context - this is necessary for correct named slot check
  let contextVm
  if (hasOwn(parent, '_uid')) {
    contextVm = Object.create(parent)
    contextVm._original = parent
  } else {
    // the context vm passed in is a functional context as well.
    // in this case we want to make sure we are able to get a hold to the
    // real context instance.
    contextVm = parent
    // @ts-ignore
    parent = parent._original
  }
  const isCompiled = isTrue(options._compiled)
  const needNormalization = !isCompiled

  this.data = data
  this.props = props
  this.children = children
  this.parent = parent
  this.listeners = data.on || emptyObject
  this.injections = resolveInject(options.inject, parent)
  this.slots = () => {
    if (!this.$slots) {
      normalizeScopedSlots(
        parent,
        data.scopedSlots,
        (this.$slots = resolveSlots(children, parent))
      )
    }
    return this.$slots
// ... (121 more lines)

Domain

Subdomains

Frequently Asked Questions

What does create-functional-component.ts do?
create-functional-component.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 create-functional-component.ts?
create-functional-component.ts defines 4 function(s): FunctionalRenderContext, cloneAndMarkFunctionalResult, createFunctionalComponent, mergeProps.
What does create-functional-component.ts depend on?
create-functional-component.ts imports 16 module(s): component, create-element.ts, createElement, index.ts, index.ts, inject.ts, installRenderHelpers, normalize-children.ts, and 8 more.
What files import create-functional-component.ts?
create-functional-component.ts is imported by 1 file(s): create-component.ts.
Where is create-functional-component.ts in the architecture?
create-functional-component.ts is located at src/core/vdom/create-functional-component.ts (domain: VueCore, subdomain: Instance, directory: src/core/vdom).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free