Skip to content

Commit 2d4635c

Browse files
authored
Fix Scoped code examples (#111)
1 parent 0e820c3 commit 2d4635c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ This library is designed with the shared state as a single source of truth first
12531253
Scoped atoms preserves the atom state in the [AtomScope](#atomscope) nearest to the ancestor of where it is used and prevents it from being shared out of scope. `Scoped` is the attribute for that feature.
12541254

12551255
```swift
1256-
struct TextInputAtom: StateAtom, Scoped Hashable {
1256+
struct TextInputAtom: StateAtom, Scoped, Hashable {
12571257
func defaultValue(context: Context) -> String {
12581258
""
12591259
}
@@ -1282,7 +1282,7 @@ When multiple `AtomScope`s are nested, and you want to store and share an atom s
12821282
```swift
12831283
struct TextScopeID: Hashable {}
12841284

1285-
struct TextInputAtom: StateAtom, Scoped Hashable {
1285+
struct TextInputAtom: StateAtom, Scoped, Hashable {
12861286
var scopeID: TextScopeID {
12871287
TextScopeID()
12881288
}

0 commit comments

Comments
 (0)