python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Cannot convert value of type 'Model' to expected argument type 'Data'
I'm trying to set up a function to capture the response from an API request and map it to a Model once the result hits.
I'm getting this error on the "data" in the "let "cloudinary...

John Gerard
Votes: 0
Answers: 0
How to Keep state of my View Model persistent across a user session in SwiftUI (MVVM)?
I am trying to implement an IOS App following the MVVM architecture. Everything works well when I don't need my state to be persistent as I move through views and navigate back.
However, when a user n...
Khalil Hajji
Votes: 0
Answers: 1
Declare a temporary variable or constant inside a closure that returns some View (SwiftUI)
I'm building a SwiftUI based view and I'd like to store a temporary value (so it can be used multiple times) in a closure that returns some View. The compiler is giving me the following error:
Unable...
Ankur
Votes: 0
Answers: 2
SwiftUI - @FocusState as condition
For some reason, I wish to use @FocusState as a condition, but it doesn't work.
struct ContentView: View {
@FocusState private var mystate: Bool
var body: some View {
if mystate {
...

Yanhao LI
Votes: 0
Answers: 1