Skip to content

Commit 3662e10

Browse files
docs(component): comment on provides
1 parent 74610a5 commit 3662e10

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/runtime-core/src/component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ export function createComponentInstance(
633633
exposeProxy: null,
634634
withProxy: null,
635635

636+
// component instance always creates a new Provides object with prototype of parent provides (or app/global provides when there is no parent instance) so to ensure that Parent provides will always be inherited, even when parent provides after the fact.
636637
provides: parent
637638
? Object.create(parent.provides)
638639
: Object.create(appContext.provides),

0 commit comments

Comments
 (0)