Added more info about the use directive

Added info about when the imported function for the use directive will be called.
pull/7743/head
Vladislav Suchkov 4 years ago committed by GitHub
parent 1198bae835
commit 58dd9c09b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,7 +15,7 @@ In this app, we want to make the orange modal close when the user clicks outside
import { clickOutside } from "./click_outside.js"; import { clickOutside } from "./click_outside.js";
``` ```
...then use it with the element: ...then use it with the element (the `clickOutside` function is called when element is created):
```html ```html
<div class="box" use:clickOutside on:outclick="{() => (showModal = false)}"> <div class="box" use:clickOutside on:outclick="{() => (showModal = false)}">

Loading…
Cancel
Save