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
In the documentation section you show an example of how to create an instance of a CoreDataPublisher:
let events: AnyPublisher<[MyEntity], Never> = managedObjectContext.publisher(for: MyEntity.self)
However, the publisher returns a type <[Entity], Error> while your documentation (above) is expecting a return type of <[Entity], Never>. To overcome this I append an eraseToAnyPublisher() to your example. Am I misunderstanding something here?
Also, Can you provide a Combine pipeline ViewModel example illustrating how CoreDataPublisher works with map, flatMap, and collect?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi
In the documentation section you show an example of how to create an instance of a CoreDataPublisher:
let events: AnyPublisher<[MyEntity], Never> = managedObjectContext.publisher(for: MyEntity.self)
However, the publisher returns a type <[Entity], Error> while your documentation (above) is expecting a return type of <[Entity], Never>. To overcome this I append an eraseToAnyPublisher() to your example. Am I misunderstanding something here?
Also, Can you provide a Combine pipeline ViewModel example illustrating how CoreDataPublisher works with map, flatMap, and collect?
Thanks.
The text was updated successfully, but these errors were encountered: