Skip to content

Commit

Permalink
docs: clarified readonly prop access (#5825)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmNudge committed Jun 27, 2021
1 parent f797482 commit 0e18b13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions site/content/docs/01-component-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ In development mode (see the [compiler options](docs#svelte_compile)), a warning

If you export a `const`, `class` or `function`, it is readonly from outside the component. Function *expressions* are valid props, however.

Readonly props can be accessed as properties on the element, tied to the component using [`bind:this` syntax](docs#bind_element).

```sv
<script>
// these are readonly
Expand Down

0 comments on commit 0e18b13

Please sign in to comment.