We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please make a small example of an application using SwiftUI & Get. Or can someone share a gist?
SwiftUI
Get
The text was updated successfully, but these errors were encountered:
@wmorgue not entirely sure what you mean, but here is a pseudo example.
import SwiftUI import Get let client = APIClient(host: "api.example.com") struct User: Decodable { let id: String } struct ContentView: View { @State private var userId: String? var body: some View { if let userId = userId { Text(userId) } else { ProgressView() .task { do { let user: User = try await client.send(.get("/user/testing")).value self.userId = user.id } catch { print(error.localizedDescription) } } } } }
Sorry, something went wrong.
@ericlewis oh gosh, it works for me. Thank you 🤝
No branches or pull requests
Please make a small example of an application using
SwiftUI
&Get
.Or can someone share a gist?
The text was updated successfully, but these errors were encountered: