From 81b18aa32f47c4253ee8364fd9caef6bba3ce39e Mon Sep 17 00:00:00 2001 From: hxperl Date: Wed, 9 Feb 2022 13:12:39 +0900 Subject: [PATCH 1/2] :art: set id automatically --- Sources/Route.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Route.swift b/Sources/Route.swift index d116856..9916f1c 100644 --- a/Sources/Route.swift +++ b/Sources/Route.swift @@ -127,6 +127,7 @@ public struct Route: View { let routeInformation = routeInformation { content(validatedData) + .id(self.path) .environment(\.relativePath, routeInformation.path) .environmentObject(routeInformation) .environmentObject(SwitchRoutesEnvironment()) From 30a2b0d96e82ee06221fbb4ded58a06f44d861f6 Mon Sep 17 00:00:00 2001 From: hxperl Date: Wed, 9 Feb 2022 13:29:56 +0900 Subject: [PATCH 2/2] :art: reorder --- Sources/Route.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Route.swift b/Sources/Route.swift index 9916f1c..3f845a1 100644 --- a/Sources/Route.swift +++ b/Sources/Route.swift @@ -127,10 +127,10 @@ public struct Route: View { let routeInformation = routeInformation { content(validatedData) - .id(self.path) .environment(\.relativePath, routeInformation.path) .environmentObject(routeInformation) .environmentObject(SwitchRoutesEnvironment()) + .id(self.path) } } }