# ObjectReader

    public struct ObjectReader<Object, Content, Placeholder, Value> : View where Object : DynamicObject, Content : View, Placeholder : View

A container view that reads changes to an `ObjectPublisher`

### Internal

- `init(_:content:)`

  Creates an instance that creates views for `ObjectPublisher` changes.

  #### Declaration

  Swift

      public init(
          _ objectPublisher: ObjectPublisher<Object>?,
          @ViewBuilder content: @escaping (ObjectSnapshot<Object>) -> Content
      ) where Value == ObjectSnapshot<Object>, Placeholder == EmptyView

  #### Parameters

  `objectPublisher` | The `ObjectPublisher` that the `ObjectReader` instance uses to create views dynamically
  `content` | The view builder that receives an `Optional<ObjectSnapshot<O>>` instance and creates views dynamically.

- `init(_:content:placeholder:)`

  Creates an instance that creates views for `ObjectPublisher` changes.

  #### Declaration

  Swift

      public init(
          _ objectPublisher: ObjectPublisher<Object>?,
          @ViewBuilder content: @escaping (ObjectSnapshot<Object>) -> Content,
          @ViewBuilder placeholder: @escaping () -> Placeholder
      ) where Value == ObjectSnapshot<Object>

  #### Parameters

  `objectPublisher` | The `ObjectPublisher` that the `ObjectReader` instance uses to create views dynamically
  `content` | The view builder that receives an `Optional<ObjectSnapshot<O>>` instance and creates views dynamically.
  `placeholder` | The view builder that creates a view for `nil` objects.

- `init(_:keyPath:content:)`

  Creates an instance that creates views for `ObjectPublisher` changes.

  #### Declaration

  Swift

      public init(
          _ objectPublisher: ObjectPublisher<Object>?,
          keyPath: KeyPath<ObjectSnapshot<Object>, Value>,
          @ViewBuilder content: @escaping (Value) -> Content
      ) where Placeholder == EmptyView

  #### Parameters

  `objectPublisher` | The `ObjectPublisher` that the `ObjectReader` instance uses to create views dynamically
  `keyPath` | A `KeyPath` for a property in the `ObjectSnapshot` whose value will be sent to the views
  `content` | The view builder that receives the value from the property `KeyPath` and creates views dynamically.

- `init(_:keyPath:content:placeholder:)`

  Creates an instance that creates views for `ObjectPublisher` changes.

  #### Declaration

  Swift

      public init(
          _ objectPublisher: ObjectPublisher<Object>?,
          keyPath: KeyPath<ObjectSnapshot<Object>, Value>,
          @ViewBuilder content: @escaping (Value) -> Content,
          @ViewBuilder placeholder: @escaping () -> Placeholder
      ) where Placeholder == EmptyView

  #### Parameters

  `objectPublisher` | The `ObjectPublisher` that the `ObjectReader` instance uses to create views dynamically
  `keyPath` | A `KeyPath` for a property in the `ObjectSnapshot` whose value will be sent to the views
  `content` | The view builder that receives the value from the property `KeyPath` and creates views dynamically.
  `placeholder` | The view builder that creates a view for `nil` objects.

### View

- `body`

  #### Declaration

  Swift

      public var body: some View { get }