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
How would you model state in a table view driven by an NSFetchResultsController?
I can let the NSFetchResultsControllerDelegateupdate the table view by inserting, updating, moving and deleting view and when the delegate methodcontrollerDidChangeContent(_:)is called, update the state using the fetch results controller's propertyfetchedObjects`.
The text was updated successfully, but these errors were encountered:
That seems like a sensible approach. What does NSFetchResultsController give you on top of ReSwift so you need to use it, though? They kind of serve a similar purpose.
One of the biggest advantages is that a FRC can monitor storage changes for you and notify your provided delegate of said changes. Whether the data set has an entry added, removed or updated.
If I use the FRC fetchedObjects and convert my entities to structs I will lose the benefits of faults (large objects can be represented by a fault instead, until they really are needed.) unless I just map fetchedObjects to their objectIDs and only keep the objectIDs in the state and create a state for a cell lazily when it is needed (when faulting).
My entities are updating continually in the background
How would you model state in a table view driven by an
NSFetchResultsController
?I can let the NSFetchResultsControllerDelegate
update the table view by inserting, updating, moving and deleting view and when the delegate method
controllerDidChangeContent(_:)is called, update the state using the fetch results controller's property
fetchedObjects`.The text was updated successfully, but these errors were encountered: