Skip to content

Commit 02d14b8

Browse files
authored
Update README.md
1 parent 52c1844 commit 02d14b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ In order to have a predictable app state, it is important that the reducer is al
7676
To maintain our state and delegate the actions to the reducers, we need a store. Let's call it `mainStore` and define it as a global constant, for example in the app delegate file:
7777

7878
```swift
79+
fileprivate let initialState = AppState(counter: 0)
80+
7981
let mainStore = Store(
8082
reducer: appReducer,
81-
observable: ObservableProperty(AppState(counter: 0))
83+
observable: ObservableProperty(initialState)
8284
)
8385

8486
@UIApplicationMain

0 commit comments

Comments
 (0)