Skip to content

Commit e1e2816

Browse files
authored
Fix infinite recomposition in NavigationStackPlayground (#81)
1 parent 19b28fb commit e1e2816

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Showcase/NavigationStackPlayground.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private struct PathBindingSheetContentView: View {
6464
@State var path: [PathElement] = []
6565

6666
init(initialPath: [PathElement] = []) {
67-
path.append(contentsOf: initialPath)
67+
_path = State(initialValue: initialPath)
6868
}
6969

7070
var body: some View {

0 commit comments

Comments
 (0)