Skip to content

Commit

Permalink
Validate atoms or views & atoms and views cases
Browse files Browse the repository at this point in the history
  • Loading branch information
rasberik committed Jan 25, 2024
1 parent 1cc259a commit 8b8e02f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Sources/Atoms/Atom/ObservableObjectAtom.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Combine
/// An atom type that instantiates an observable object.
///
/// When published properties of the observable object provided through this atom changes, it
/// notifies updates to downstream atoms and views that watches this atom.
/// notifies updates to downstream atoms and views that are watching this atom.
/// In case you want to get another atom value from the context later by methods in that
/// observable object, you can pass it as ``AtomContext``.
///
Expand Down Expand Up @@ -55,7 +55,7 @@ public protocol ObservableObjectAtom: Atom {
/// Creates an observed object when this atom is actually used.
///
/// The observable object that returned from this method is managed internally and notifies
/// its updates to downstream atoms and views that watches this atom.
/// its updates to downstream atoms and views are watching this atom.
///
/// - Parameter context: A context structure to read, watch, and otherwise
/// interact with other atoms.
Expand Down
6 changes: 3 additions & 3 deletions Sources/Atoms/Context/AtomContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public protocol AtomContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you assign a new value, it immediately notifies downstream atoms or views.
/// When you assign a new value, it immediately notifies downstream atoms and views.
///
/// - SeeAlso: ``AtomContext/subscript``
///
Expand Down Expand Up @@ -110,7 +110,7 @@ public extension AtomContext {
///
/// This subscript only accepts read-write atoms such as types conforming to ``StateAtom``,
/// and returns the value or assigns a new value for the atom.
/// When you assign a new value, it immediately notifies downstream atoms or views,
/// When you assign a new value, it immediately notifies downstream atoms and views,
/// but it doesn't start watching the atom.
///
/// ```swift
Expand Down Expand Up @@ -163,7 +163,7 @@ public extension AtomWatchableContext {
/// This method only accepts read-write atoms such as types conforming to ``StateAtom``,
/// and returns a binding that accesses the value or assigns a new value for the atom.
/// When you set a new value to the `wrappedValue` property of the binding, it assigns the value
/// to the atom, and immediately notifies downstream atoms or views.
/// to the atom, and immediately notifies downstream atoms and views.
/// Note that the binding initiates watching the given atom when the value is accessed through the
/// `wrappedValue` property.
///
Expand Down
4 changes: 2 additions & 2 deletions Sources/Atoms/Context/AtomCurrentContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public struct AtomCurrentContext<Coordinator>: AtomContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you assign a new value, it immediately notifies downstream atoms or views.
/// When you assign a new value, it immediately notifies downstream atoms and views.
///
/// - SeeAlso: ``AtomViewContext/subscript``
///
Expand All @@ -60,7 +60,7 @@ public struct AtomCurrentContext<Coordinator>: AtomContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you modify the value, it notifies downstream atoms or views after all
/// When you modify the value, it notifies downstream atoms and views after all
/// modifications are completed.
///
/// ```swift
Expand Down
4 changes: 2 additions & 2 deletions Sources/Atoms/Context/AtomTestContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public struct AtomTestContext: AtomWatchableContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you assign a new value, it immediately notifies downstream atoms or views.
/// When you assign a new value, it immediately notifies downstream atoms and views.
///
/// - SeeAlso: ``AtomTestContext/subscript``
///
Expand All @@ -194,7 +194,7 @@ public struct AtomTestContext: AtomWatchableContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you modify the value, it notifies downstream atoms or views after all
/// When you modify the value, it notifies downstream atoms and views after all
/// modifications are completed.
///
/// ```swift
Expand Down
6 changes: 3 additions & 3 deletions Sources/Atoms/Context/AtomTransactionContext.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// A context structure to read, watch, and otherwise interact with atoms.
///
/// When an atom is watchedthrough this context, and that atom is updated,
/// When an atom is watched through this context, and that atom is updated,
/// the value of the atom where this context is provided will be updated transitively.
@MainActor
public struct AtomTransactionContext<Coordinator>: AtomWatchableContext {
Expand Down Expand Up @@ -45,7 +45,7 @@ public struct AtomTransactionContext<Coordinator>: AtomWatchableContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you assign a new value, it immediately notifies downstream atoms or views.
/// When you assign a new value, it immediately notifies downstream atoms and views.
///
/// - SeeAlso: ``AtomTransactionContext/subscript``
///
Expand All @@ -68,7 +68,7 @@ public struct AtomTransactionContext<Coordinator>: AtomWatchableContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you modify the value, it notifies downstream atoms or views after all
/// When you modify the value, it notifies downstream atoms and views after all
/// modifications are completed.
///
/// ```swift
Expand Down
6 changes: 3 additions & 3 deletions Sources/Atoms/Context/AtomViewContext.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// A context structure to read, watch, and otherwise interact with atoms.
///
/// When an atom is watchedthrough this context, and that atom is updated,
/// When an atom is watched through this context, and that atom is updated,
/// the view where this context is used will be rebuilt.
@MainActor
public struct AtomViewContext: AtomWatchableContext {
Expand Down Expand Up @@ -44,7 +44,7 @@ public struct AtomViewContext: AtomWatchableContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you assign a new value, it immediately notifies downstream atoms or views.
/// When you assign a new value, it immediately notifies downstream atoms and views.
///
/// - SeeAlso: ``AtomViewContext/subscript``
///
Expand All @@ -67,7 +67,7 @@ public struct AtomViewContext: AtomWatchableContext {
///
/// This method only accepts writable atoms such as types conforming to ``StateAtom``,
/// and assigns a new value for the atom.
/// When you modify the value, it notifies downstream atoms or views after all
/// When you modify the value, it notifies downstream atoms and views after all
/// modifications are completed.
///
/// ```swift
Expand Down

0 comments on commit 8b8e02f

Please sign in to comment.