Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/api/composition-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ const foo = inject<string>('foo') // string | undefined
`getCurrentInstance` enables access to an internal component instance useful for advanced usages or for library creators.

```ts
import { getCurrentIntance } from 'vue'
import { getCurrentInstance } from 'vue'

const MyComponent = {
setup() {
const internalIntance = getCurrentInstance()
const internalInstance = getCurrentInstance()

internalInstance.appContext.config.globalProperties // access to globalProperties
}
Expand All @@ -182,15 +182,15 @@ const MyComponent = {
```ts
const MyComponent = {
setup() {
const internalIntance = getCurrentInstance() // works
const internalInstance = getCurrentInstance() // works

const id = useComponentId() // works

const handleClick = () => {
getCurrentInstance() // doesn't work
useComponentId() // doesn't work

internalIntance // works
internalInstance // works
}

onMounted(() => {
Expand Down