From 98a55e4ffc2dcfec3e96019be82f36af59cd411e Mon Sep 17 00:00:00 2001 From: Ravi van Rooijen Date: Sat, 15 Mar 2025 19:00:49 +0100 Subject: [PATCH] docs: mention that snippets can only be called through @render --- documentation/docs/03-template-syntax/06-snippet.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/docs/03-template-syntax/06-snippet.md b/documentation/docs/03-template-syntax/06-snippet.md index c9951d3f3414..5e20094f234c 100644 --- a/documentation/docs/03-template-syntax/06-snippet.md +++ b/documentation/docs/03-template-syntax/06-snippet.md @@ -55,6 +55,8 @@ Snippets, and [render tags](@render), are a way to create reusable chunks of mar Like function declarations, snippets can have an arbitrary number of parameters, which can have default values, and you can destructure each parameter. You cannot use rest parameters, however. +> [!NOTE] Unlike function declarations, you can only call a snippet through the [`{@render ...}`](@render) tag. + ## Snippet scope Snippets can be declared anywhere inside your component. They can reference values declared outside themselves, for example in the `