0

The following behaviour is kind of unexpected. I have a Form with a simple View inside like this:

Form {
    Text("ChildView")
        .onAppear(perform: { print("APPEAR") })
        .onDisappear(perform: { print("DISAPPEAR") })
}

When the form is rendered the Text is appearing twice and then immediately disappears. Although the Form is rendered once the output is:

APPEAR
DISAPPEAR
APPEAR
DISAPPEAR
APPEAR

The same behaviour applies to List. I would expect that the content of the list or form is rendered only once.

Iam using XCode 12.0GM on iOS 14.

pawello2222
  • 46,897
  • 22
  • 145
  • 209
Erwin Schens
  • 424
  • 2
  • 9

0 Answers0