Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Qata authored Mar 3, 2017
1 parent 52c1844 commit 02d14b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ In order to have a predictable app state, it is important that the reducer is al
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:

```swift
fileprivate let initialState = AppState(counter: 0)

let mainStore = Store(
reducer: appReducer,
observable: ObservableProperty(AppState(counter: 0))
observable: ObservableProperty(initialState)
)

@UIApplicationMain
Expand Down

0 comments on commit 02d14b8

Please sign in to comment.