We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f39b1a commit c8050cbCopy full SHA for c8050cb
src/components/component.js
@@ -28,6 +28,7 @@ export function defineComponent({ render,
28
#dispatcher = new Dispatcher();
29
#subscriptions = []; // An array for the unsubscribe functions
30
#children = []; // Slots
31
+ #appContext = null;
32
33
34
constructor(
@@ -164,10 +165,13 @@ export function defineComponent({ render,
164
165
return Promise.resolve(onUnmounted.call(this));
166
}
167
- // async onMounted() {
168
- // const data = await fetch('https://api.example.com/data')
169
- // this.updateState({ data })
170
- // }
+ setAppContext(appContext) {
+ this.#appContext = appContext;
+ }
171
+
172
+ get appContext() {
173
+ return this.#appContext;
174
175
176
177
for (const methodName in methods) {
0 commit comments