Skip to content

Commit

Permalink
chore: derive Clone for RouteChildren (leptos-rs#3462)
Browse files Browse the repository at this point in the history
This change allows users to clone RouteChildren and call .into_inner() on it to get an owned version of <Children>, and then pass on the original RouteChildren to an underlying Routes, or ParentRoute component.
This helps users snapshot all possible routes in an application.
  • Loading branch information
Innominus authored Jan 10, 2025
1 parent 165911b commit 6d19e1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion router/src/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use tachys::view::any_view::AnyView;

/// A wrapper that allows passing route definitions as children to a component like [`Routes`],
/// [`FlatRoutes`], [`ParentRoute`], or [`ProtectedParentRoute`].
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct RouteChildren<Children>(Children);

impl<Children> RouteChildren<Children> {
Expand Down

0 comments on commit 6d19e1a

Please sign in to comment.