diff --git a/Sources/TokamakCore/MountedViews/MountedHostView.swift b/Sources/TokamakCore/MountedViews/MountedHostView.swift index 071643835..cabfa7772 100644 --- a/Sources/TokamakCore/MountedViews/MountedHostView.swift +++ b/Sources/TokamakCore/MountedViews/MountedHostView.swift @@ -94,6 +94,7 @@ public final class MountedHostView: MountedElement { while let child = mountedChildren.first, let firstChild = childrenViews.first { let newChild: MountedElement if firstChild.typeConstructorName == mountedChildren[0].view.typeConstructorName { + child.environmentValues = environmentValues child.view = firstChild child.updateEnvironment() child.update(with: reconciler) diff --git a/Sources/TokamakCore/Views/NavigationView.swift b/Sources/TokamakCore/Views/NavigationView.swift index 35c7c84cf..9eca0f14c 100644 --- a/Sources/TokamakCore/Views/NavigationView.swift +++ b/Sources/TokamakCore/Views/NavigationView.swift @@ -30,7 +30,7 @@ public struct NavigationView: View where Content: View { } /// This is a helper class that works around absence of "package private" access control in Swift -public struct _NavigationViewProxy { +public struct _NavigationViewProxy: View { public let subject: NavigationView public init(_ subject: NavigationView) { self.subject = subject } diff --git a/Sources/TokamakStaticHTML/Views/NavigationView.swift b/Sources/TokamakStaticHTML/Views/NavigationView.swift index e3cc63f96..aad783610 100644 --- a/Sources/TokamakStaticHTML/Views/NavigationView.swift +++ b/Sources/TokamakStaticHTML/Views/NavigationView.swift @@ -22,7 +22,7 @@ extension NavigationView: ViewDeferredToRenderer { width: 100%; height: 100%; """, ]) { - _NavigationViewProxy(self).body + _NavigationViewProxy(self) }) } }