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

Function validateComponentName

packages/runtime-core/src/component.ts:790–799  ·  view source on GitHub ↗
(
  name: string,
  { isNativeTag }: AppConfig,
)

Source from the content-addressed store, hash-verified

788const isBuiltInTag = /*@__PURE__*/ makeMap('slot,component')
789
790export function validateComponentName(
791 name: string,
792 { isNativeTag }: AppConfig,
793): void {
794 if (isBuiltInTag(name) || isNativeTag(name)) {
795 warn(
796 'Do not use built-in or reserved HTML elements as component id: ' + name,
797 )
798 }
799}
800
801export function isStatefulComponent(
802 instance: ComponentInternalInstance,

Callers 2

componentFunction · 0.90
setupStatefulComponentFunction · 0.85

Calls 1

warnFunction · 0.90

Tested by

no test coverage detected