Skip to content

docs: typos in composition-api.md #597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2020
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