Skip to content

update application-api.md #1391

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
Dec 27, 2021
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
6 changes: 3 additions & 3 deletions src/api/application-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ app.mount('#my-app')
Providing values via the application is especially useful when writing plugins, as plugins typically wouldn't be able to provide values using components. It is an alternative to using [globalProperties](application-config.html#globalproperties).

:::tip Note
The `provide` and `inject` bindings are NOT reactive. This is intentional. However, if you pass down an observed object, properties on that object do remain reactive.
The `provide` and `inject` bindings are NOT reactive. This is intentional. However, if you pass down a reactive object, properties on that object do remain reactive.
:::

- **Example:**
Expand Down Expand Up @@ -298,9 +298,9 @@ setTimeout(() => app.unmount(), 5000)

- **Usage:**

Install a Vue.js plugin. If the plugin is an Object, it must expose an `install` method. If it is a function itself, it will be treated as the install method.
Install a Vue.js plugin. If the plugin is an Object, it must expose an `install` method. If it is a function itself, it will be treated as the `install` method.

The install method will be called with the application as its first argument. Any `options` passed to `use` will be passed on in subsequent arguments.
The `install` method will be called with the application as its first argument. Any `options` passed to `use` will be passed on in subsequent arguments.

When this method is called on the same plugin multiple times, the plugin will be installed only once.

Expand Down