From 790d6166c2761c0dcea9a2f721a5f2f6b6f3294d Mon Sep 17 00:00:00 2001 From: Harvey Date: Sat, 26 Mar 2022 22:38:14 +0800 Subject: [PATCH] this's value in setup is undefined --- src/api/composition-api-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/composition-api-setup.md b/src/api/composition-api-setup.md index e59cd4ca82..9c21c05af3 100644 --- a/src/api/composition-api-setup.md +++ b/src/api/composition-api-setup.md @@ -41,7 +41,7 @@ export default { Note that [refs](/api/reactivity-core.html#ref) returned from `setup` are [automatically shallow unwrapped](/guide/essentials/reactivity-fundamentals.html#deep-reactivity) when accessed in the template so you do not need to use `.value` when accessing them. They are also unwrapped in the same way when accessed on `this`. :::tip -`setup()` itself does not have access to the component instance - `this` will have a value of `null` inside `setup()`. You can access Composition-API-exposed values from Options API, but not the other way around. +`setup()` itself does not have access to the component instance - `this` will have a value of `undefined` inside `setup()`. You can access Composition-API-exposed values from Options API, but not the other way around. ::: ## Accessing Props