Update site/content/docs/01-component-format.md

Co-Authored-By: Luca Bonavita <mindrones@users.noreply.github.com>
pull/4460/head
Jesse Skinner 6 years ago committed by GitHub
parent e496e81d6f
commit bfe1b2c530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,7 +42,7 @@ Svelte uses the `export` keyword to mark a variable declaration as a *property*
--- ---
You can specify an initial value for a prop. It will be used if the component's consumer doesn't specify the prop on the component. Note that whenever a specified prop is removed by the consumer, the value is set to `undefined` rather than the initial value. You can specify a default initial value for a prop. It will be used if the component's consumer doesn't specify the prop on the component (or if its initial value is `undefined`). Note that whenever a prop is removed by the consumer, its value is set to `undefined` rather than the initial value.
In development mode (see the [compiler options](docs#svelte_compile)), a warning will be printed if no initial value is provided and the consumer does not specify a value. To squelch this warning, ensure that an initial value is specified, even if it is `undefined`. In development mode (see the [compiler options](docs#svelte_compile)), a warning will be printed if no initial value is provided and the consumer does not specify a value. To squelch this warning, ensure that an initial value is specified, even if it is `undefined`.

Loading…
Cancel
Save