Skip to content

Commit

Permalink
Fix Composing features tutorial; Modify Make the State conform to Eq…
Browse files Browse the repository at this point in the history
…uatable to pass the test. (#2727)

* Make the State conform to Equatable to pass the test

* Add note about Equatable.

---------

Co-authored-by: Brandon Williams <[email protected]>
  • Loading branch information
Kyome22 and mbrandonw authored Jan 26, 2024
1 parent 36331fc commit 4465e4e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ComposableArchitecture

@Reducer
struct AppFeature {
struct State {
struct State: Equatable {
var tab1 = CounterFeature.State()
var tab2 = CounterFeature.State()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ComposableArchitecture

@Reducer
struct AppFeature {
struct State {
struct State: Equatable {
var tab1 = CounterFeature.State()
var tab2 = CounterFeature.State()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ComposableArchitecture

@Reducer
struct AppFeature {
struct State {
struct State: Equatable {
var tab1 = CounterFeature.State()
var tab2 = CounterFeature.State()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
and actions for each tab, each of which are just the `CounterFeature`.

@Code(name: "AppFeature.swift", file: 01-04-02-code-0002.swift)

> Note: We are proactively conforming `State` to `Equatable` in order to be able to write
tests on this feature later.
}

@Step {
Expand Down

0 comments on commit 4465e4e

Please sign in to comment.