(vnode: FullComponent, parentContext: ParentContext)
| 80 | } |
| 81 | |
| 82 | export function getContextByContextType (vnode: FullComponent, parentContext: ParentContext) { |
| 83 | const contextType = vnode.type.contextType |
| 84 | const hasContextType = !isUndefined(contextType) |
| 85 | const provider = hasContextType ? (parentContext[contextType._id]) : null |
| 86 | const context = hasContextType |
| 87 | ? ( |
| 88 | !isNullOrUndef(provider) ? provider.value : contextType._defaultValue |
| 89 | ) |
| 90 | : parentContext |
| 91 | return context |
| 92 | } |
| 93 | |
| 94 | export function mountComponent ( |
| 95 | vnode: FullComponent, |
no test coverage detected