0

I have code with NavigationView and List view that contains a ForEach with NavigationLink. My problem is in the view when user pressing button save with user info id, username etc. in ContentView that info appears only after refreshing app, so my question what logic I can put in .refreshable modifier?

@ObservedObject var habit = Habit()
...
ForEach(0..<habit.items.count, id: .self) { index in
NavigationLink(destination: HabitView(habit: self.habit, index: index)) {
...

I think that this link demonstrates one possible solution, for another way, but it exceeds my skills in programming: https://troz.net/post/2019/swiftui-data-flow/ .

I think in this situation is a simpler solution than to change all of the code.

0 Answers0