From ae971f80ae11659c8885748a5aeaac82eb5ec17b Mon Sep 17 00:00:00 2001 From: Eugene Hwang Date: Thu, 10 Sep 2020 15:31:28 -0400 Subject: [PATCH] docs: adjust explanations of `$$props` and `$$restProps` (#5368) --- site/content/docs/02-template-syntax.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index cfc7d7ba7a..e93449728b 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -107,7 +107,7 @@ An element or component can have multiple spread attributes, interspersed with r --- -*`$$props`* references all props that are passed to a component – including ones that are not declared with `export`. It is useful in rare cases, but not generally recommended, as it is difficult for Svelte to optimise. +*`$$props`* references all props that are passed to a component, including ones that are not declared with `export`. It is not generally recommended, as it is difficult for Svelte to optimise. But it can be useful in rare cases – for example, when you don't know at compile time what props might be passed to a component. ```sv @@ -115,7 +115,7 @@ An element or component can have multiple spread attributes, interspersed with r --- -*`$$restProps`* contains only the props which are *not* declared with `export`. It can be used to pass down other unknown attributes to an element in a component. +*`$$restProps`* contains only the props which are *not* declared with `export`. It can be used to pass down other unknown attributes to an element in a component. It shares the same optimisation problems as *`$$props`*, and is likewise not recommended. ```html