Skip to content

Fix typo in GettingStarted.md and README.md #1659

New issue

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

Merged
merged 2 commits into from
Nov 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ struct MyApp: App {
numberFact: { number in
let (data, _) = try await URLSession.shared
.data(from: .init(string: "http://numbersapi.com/\(number)")!)
return String(decoding: data, using: UTF8.self)
return String(decoding: data, as: UTF8.self)
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ struct Feature: ReducerProtocol {
TaskResult {
String(
decoding: try await URLSession.shared
.data(from: URL(string: "http://numbersapi.com/\(number)/trivia")!).0,
using: UTF8.self
.data(from: URL(string: "http://numbersapi.com/\(count)/trivia")!).0,
as: UTF8.self
)
}
)
Expand Down Expand Up @@ -346,10 +346,10 @@ struct MyApp: App {
store: Store(
initialState: Feature.State(),
reducer: Feature(
numberFact: {
numberFact: { number in
let (data, _) = try await URLSession.shared
.data(from: .init(string: "http://numbersapi.com/\(number)")!)
return String(decoding: data, using: UTF8.self)
return String(decoding: data, as: UTF8.self)
}
)
)
Expand Down Expand Up @@ -409,10 +409,10 @@ dependency to be used by default:
```swift
private enum NumberFactClientKey: DependencyKey {
static let liveValue = NumberFactClient(
fetch: {
fetch: { number in
let (data, _) = try await URLSession.shared
.data(from: .init(string: "http://numbersapi.com/\(number)")!)
return String(decoding: data, using: UTF8.self)
return String(decoding: data, as: UTF8.self)
}
)
}
Expand Down