Skip to content

Commit dc73b73

Browse files
authored
docs: clarify onMount with non-synchronous handlers (#5053)
1 parent 6e2b816 commit dc73b73

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

site/content/docs/03-run-time.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ If a function is returned from `onMount`, it will be called when the component i
5050
</script>
5151
```
5252

53+
> This behaviour will only work when the function passed to `onMount` *synchronously* returns a value. `async` functions always return a `Promise`, and as such cannot *synchronously* return a function.
54+
5355
#### `beforeUpdate`
5456

5557
```js

0 commit comments

Comments
 (0)