From 87eb9744e094e027c6df85ee142086f18aaadc89 Mon Sep 17 00:00:00 2001 From: ealmloff Date: Tue, 30 Jan 2024 12:04:31 -0600 Subject: [PATCH 1/2] fix a tiny typo in the Routable macro docs: the route attribute only takes 2 parameters, not three --- packages/router-macro/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router-macro/src/lib.rs b/packages/router-macro/src/lib.rs index 024570ae1..6a69ad99a 100644 --- a/packages/router-macro/src/lib.rs +++ b/packages/router-macro/src/lib.rs @@ -84,7 +84,7 @@ mod segment; /// /// # `#[route("path", component)]` /// -/// The `#[route]` attribute is used to define a route. It takes up to 3 parameters: +/// The `#[route]` attribute is used to define a route. It takes up to 2 parameters: /// - `path`: The path to the enum variant (relative to the parent nest) /// - (optional) `component`: The component to render when the route is matched. If not specified, the name of the variant is used /// From 1e013a7f24d46ebd7452fbb27d448acbc825e5e7 Mon Sep 17 00:00:00 2001 From: ealmloff Date: Tue, 30 Jan 2024 12:12:48 -0600 Subject: [PATCH 2/2] fix the layout docs as well --- packages/router-macro/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router-macro/src/lib.rs b/packages/router-macro/src/lib.rs index 6a69ad99a..b7ae6505f 100644 --- a/packages/router-macro/src/lib.rs +++ b/packages/router-macro/src/lib.rs @@ -162,7 +162,7 @@ mod segment; /// /// # `#[layout(component)]` /// -/// The `#[layout]` attribute is used to define a layout. It takes 2 parameters: +/// The `#[layout]` attribute is used to define a layout. It takes 1 parameters: /// - `component`: The component to render when the route is matched. If not specified, the name of the variant is used /// /// The layout component allows you to wrap all children of the layout in a component. The child routes are rendered in the Outlet of the layout component. The layout component must take all dynamic parameters of the nests it is nested in.