Skip to content

Commit 71fb483

Browse files
authored
Update the documentation (#81)
1 parent b12cb19 commit 71fb483

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

README.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525

2626
Whether you're working on any platform or within any framework, **OneWay** can seamlessly integrate. With zero third-party dependencies, **OneWay** can be used in its purest form. This library isn't limited to use only for the presentation layer. It's also useful for streamlining intricate business logic. You'll find it beneficial whenever you seek to implement logic in a unidirectional manner.
2727

28-
> [!NOTE]
29-
> OneWay is a good solution for preparing Swift 6.
30-
3128
- [Data Flow](#data-flow)
3229
- [Usage](#usage)
3330
- [Documentation](#documentation)
@@ -71,11 +68,9 @@ struct CountingReducer: Reducer {
7168
case .increment:
7269
state.number += 1
7370
return .none
74-
7571
case .decrement:
7672
state.number -= 1
7773
return .none
78-
7974
case .twice:
8075
return .concat(
8176
.just(.setIsLoading(true)),
@@ -85,7 +80,6 @@ struct CountingReducer: Reducer {
8580
),
8681
.just(.setIsLoading(false))
8782
)
88-
8983
case .setIsLoading(let isLoading):
9084
state.isLoading = isLoading
9185
return .none
@@ -154,7 +148,7 @@ for await number in store.states.number {
154148
// Prints "10", "20"
155149
```
156150

157-
If you want to continue receiving the value even when the same value is assigned to the `State`, you can use `@Sensitive`. For explanations of other useful property wrappers(e.g. [@Heap](https://swiftpackageindex.com/devyeom/oneway/main/documentation/oneway/heap), [@Insensitive](https://swiftpackageindex.com/devyeom/oneway/main/documentation/oneway/insensitive)), refer to [here](https://swiftpackageindex.com/devyeom/oneway/main/documentation/oneway/sensitive).
151+
If you want to continue receiving the value even when the same value is assigned to the `State`, you can use `@Sensitive`. For explanations of other useful property wrappers(e.g. [@CopyOnWrite](https://swiftpackageindex.com/devyeom/oneway/main/documentation/oneway/copyonwrite), [@Insensitive](https://swiftpackageindex.com/devyeom/oneway/main/documentation/oneway/insensitive)), refer to [here](https://swiftpackageindex.com/devyeom/oneway/main/documentation/oneway/sensitive).
158152

159153
```swift
160154
struct State: Sendable, Equatable {

Sources/OneWay/OneWay.docc/OneWay.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ struct CountingReducer: Reducer {
2727
case .increment:
2828
state.number += 1
2929
return .none
30-
3130
case .decrement:
3231
state.number -= 1
3332
return .none
34-
3533
case .twice:
3634
return .concat(
3735
.just(.setIsLoading(true)),
@@ -41,7 +39,6 @@ struct CountingReducer: Reducer {
4139
),
4240
.just(.setIsLoading(false))
4341
)
44-
4542
case .setIsLoading(let isLoading):
4643
state.isLoading = isLoading
4744
return .none
@@ -80,7 +77,7 @@ OneWay is released under the MIT license. See LICENSE for details.
8077

8178
### PropertyWrappers
8279

83-
- ``Heap``
80+
- ``CopyOnWrite``
8481
- ``Insensitive``
8582
- ``Sensitive``
8683

0 commit comments

Comments
 (0)