Skip to content

Commit

Permalink
Updated docs (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
KazaiMazai authored Sep 3, 2024
1 parent bdd30a8 commit 63656af
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions Docs/Migration-Guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@ Here is an overview of what to be changed:

1. Replace `StoreFactory` with `StateStore`.

```swift
// Before:

let storeFactory = StoreFactory(
MyInitialState(),
qos: .userInteractive,
reducer: myReducer
)
```diff

// After:
- let storeFactory = StoreFactory(
- MyInitialState(),
- qos: .userInteractive,
- reducer: myReducer
- )

let store = StateStore(
MyInitialState(),
qos: .userInteractive,
reducer: myReducer
)
+ let store = StateStore(
+ MyInitialState(),
+ qos: .userInteractive,
+ reducer: myReducer
+ )
```

### Child Store Changes
Expand Down Expand Up @@ -89,13 +86,13 @@ Follow deprecation notices documentation for more details.
1. Migrate from `StoreFactory` and `EnvStoreFactory` to `StateStore`
2. Inject root store with `@InjectEntry`:

```swift
```diff

extension Injected {
@InjectEntry var appState = StateStore<AppState, Action>(AppState()) { state, action in
state.reduce(action)
}
}
+ extension Injected {
+ @InjectEntry var appState = StateStore<AppState, Action>(AppState()) { state, action in
+ state.reduce(action)
+ }
+ }

```

Expand Down

0 comments on commit 63656af

Please sign in to comment.