Skip to content

add activate to api lifecycle hooks #381

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
Aug 30, 2016
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
13 changes: 13 additions & 0 deletions src/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,19 @@ type: api

- **See also:** [Lifecycle Diagram](/guide/instance.html#Lifecycle-Diagram)

### activate

- **Type:** `Function`

- **Arguments:**
- `{Function} done`

- **Details:**

Called after compilation is finished, right before the `ready` hook - but **only** during dynamic component swapping or in the initial render for static components. Unlike other lifecycle hooks, it accepts a `done` callback, which must be called for the rest of the lifecycle to complete. It's most useful for performing some asynchronous operation before a component is swapped in, like fetching data from an API.

- **See also:** [Dynamic Components](/guide/components.html#Dynamic-Components)

### ready

- **Type:** `Function`
Expand Down