Function
createBlock
(
type: VNodeTypes | ClassComponent,
props?: Record<string, any> | null,
children?: any,
patchFlag?: number,
dynamicProps?: string[],
)
Source from the content-addressed store, hash-verified
| 367 | * @private |
| 368 | */ |
| 369 | export function createBlock( |
| 370 | type: VNodeTypes | ClassComponent, |
| 371 | props?: Record<string, any> | null, |
| 372 | children?: any, |
| 373 | patchFlag?: number, |
| 374 | dynamicProps?: string[], |
| 375 | ): VNode { |
| 376 | return setupBlock( |
| 377 | createVNode( |
| 378 | type, |
| 379 | props, |
| 380 | children, |
| 381 | patchFlag, |
| 382 | dynamicProps, |
| 383 | true /* isBlock: prevent a block from tracking itself */, |
| 384 | ), |
| 385 | ) |
| 386 | } |
| 387 | |
| 388 | export function isVNode(value: any): value is VNode { |
| 389 | return value ? value.__v_isVNode === true : false |