-1

Here's the View's Signature:

enter image description here

Here's the attempt to create a preview:

enter image description here

I've been trying to satisfy the compiler.

What am I doing wrong?

Frederick C. Lee
  • 9,019
  • 17
  • 64
  • 105
  • Does this answer your question https://stackoverflow.com/a/60632545/12299030? – Asperi Nov 02 '20 at 19:49
  • Does this answer your question? [SwiftUI @Binding Initialize](https://stackoverflow.com/questions/56685964/swiftui-binding-initialize) You should be using `.constant()`, something like `.constant([""])` instead of `$list`. – Andrew Nov 02 '20 at 19:49
  • 2
    Preview is a static variable so list has to be as well. You also need to give it an initial value ‘@State static var list = [String]()’ – LuLuGaGa Nov 02 '20 at 19:55

1 Answers1

0

I tried three of the suggestions.
The 'static' option (via LuLuGaGa) was the best:

enter image description here

Frederick C. Lee
  • 9,019
  • 17
  • 64
  • 105