-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_CoreDataDependency
doesn't update its Fetched
item.
#68
Comments
I used print statements to verify that state is indeed being mutated as one would expect. Since the reducer is not recognizing that anything changed at all, that leads me to believe that What I also find odd is that
So strange that I don't see the extension Fetched: Equatable {
public static func == (lhs: Fetched, rhs: Fetched) -> Bool {
return lhs.id == rhs.id &&
lhs.context == rhs.context &&
lhs.viewContext == rhs.viewContext &&
lhs.token == rhs.token
}
} That would certainly explain why despite mutating state, the reducer is not actually sending updates to |
Oh fascinating! Looking through the Swift proposal SE-0185 relating to synthesizing
Something tells me it's not a coincidence that the very property we need to check for equatability might be excluded from whatever the Swift compiler synthesizes for us ;) |
Oh no :( :( :( |
Discussed in #67
Originally posted by m-housh May 19, 2023
Forgive my ignorance with
CoreData
in general, but I'm playing around with the_CoreDataDependency
and trying to determine how to update aFetched
item. I have tried several approaches, mainly the following...This does not update the view / state, however if I shut the app down and restart it, the complete value is toggled. So I'm not sure if I need to invalidate the cached items that have been fetched, but calling my task that initially loads the todo's does not seem to update the todo's state either. Once again, forgive my ignorance in working with core data in general as it seems like there's something basic that I'm missing.
Here's the repository for more complete example.
https://github.com/m-housh/CoreData_Test
The text was updated successfully, but these errors were encountered: