Skip to content

Commit 3a8ff43

Browse files
committed
πŸ“š Update README to add SharedState
1 parent 40053cd commit 3a8ff43

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ A simple cache that can be used to store objects.
3030
Use a `Stash` to store objects of a given type in memory using an associated key.
3131
You can then fetch attempt to retrieve from the `Stash` at a later time using the key.
3232

33+
### πŸ“¬ SharedState
34+
A simple container that encapsulates an object allowing others to subscribe to and monitor changes to the state.
35+
36+
Frequently use in PointFree's TCA architecture to subscribe long-running effects to shared state changes.
37+
3338
### ⛓️ Extensions
3439
A collection of useful extensions that I freqeuntly implement across multiple projects.
3540

β€ŽSources/SharedState/SharedState.swiftβ€Ž

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ import Fuse
2929
public typealias SharedStateUpdateBlock<T> = (_ old: T, _ new: T) async -> Void
3030

3131

32-
/// A box that encapsulates an object allowing others to subscribe to and monitor changes to the state.
33-
///
34-
/// Useful when you have multiple services or features that wish to subscribe to changes.
35-
///
36-
/// Frequently use in PointFree's TCA architecture to subsribe long-running effects to shared state changes.
32+
/// A simple container that encapsulates an object allowing others to subscribe to and monitor changes to the state.
33+
///
34+
/// Frequently use in PointFree's TCA architecture to subscribe long-running effects to shared state changes.
3735
///
3836
/// ```
3937
/// let settings = SharedState(Settings(theme: .dark), onChange: { old, new in

0 commit comments

Comments
Β (0)