Skip to content

Commit de9246d

Browse files
authored
add activate to api lifecycle hooks (vuejs#381)
1 parent 6310b54 commit de9246d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/api/index.md

+13
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,19 @@ type: api
688688

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

691+
### activate
692+
693+
- **Type:** `Function`
694+
695+
- **Arguments:**
696+
- `{Function} done`
697+
698+
- **Details:**
699+
700+
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.
701+
702+
- **See also:** [Dynamic Components](/guide/components.html#Dynamic-Components)
703+
691704
### ready
692705

693706
- **Type:** `Function`

0 commit comments

Comments
 (0)