You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides the internal store which provides atoms to view-tree through environment values.
380
+
Provides a store object which manages the state of atoms to view-tree through environment values.
381
381
It must be the root of any views to manage atoms used throughout the application.
382
382
383
383
```swift
@@ -398,7 +398,7 @@ struct ExampleApp: App {
398
398
### Atoms
399
399
400
400
An atom represents a piece of state and is the source of truth for your app. It can also represent a derived data by combining and transforming one or more other atoms.
401
-
Each atom does not actually have a global data inside, and retrieve values from the internal store provided by the `AtomRoot`. That's why *they can be accessed from anywhere, but never lose testability.*
401
+
Each atom does not actually have a global data inside, and retrieve values from the store provided by the `AtomRoot`. That's why *they can be accessed from anywhere, but never lose testability.*
402
402
403
403
An atom and its value are associated using a unique `key` which is automatically defined if the atom conforms to `Hashable`, but you can also define it explicitly without Hashable.
404
404
@@ -1458,7 +1458,7 @@ struct RootView: View {
1458
1458
</details>
1459
1459
1460
1460
Unfortunately, SwiftUI has a bug in iOS14 or lower where the `EnvironmentValue` is removed from a screen presented with `.sheet` just before dismissing it. Since this library is designed based on `EnvironmentValue`, this bug end up triggering the friendly `assertionFailure` that is added so that developers can easily aware of forgotten `AtomRoot` implementation.
1461
-
As a workaround, `AtomScope` has the ability to explicitly inherit the internal store through `AtomViewContext` from the parent view.
1461
+
As a workaround, `AtomScope` has the ability to explicitly inherit the store through `AtomViewContext` from the parent view.
1462
1462
1463
1463
#### Some SwiftUI modifiers cause memory leak (Fixed in iOS16)
0 commit comments