Skip to content

Conversation

@ra1028
Copy link
Owner

@ra1028 ra1028 commented Aug 1, 2022

Pull Request Type

  • Bug fix
  • New feature
  • Refactoring
  • Documentation update
  • Chore

Issue for this PR

Link: #9

Description

ObservableObjectAtom doesn't update other atoms that depend on it correctly.
The root cause was the downstream atoms observes the update by subscribing to objectWillChange publisher, but it notifies update at willSet property observer, so the property is yet to be updated.

Motivation and Context

#9

Impact on Existing Code

Added an overload function of AtomRelationContext/watch for ObservableObject. It wouldn't be a critical syntax change but there's a difference on compilation.

… the new value of the observable object's property is actually set
@ra1028 ra1028 marked this pull request as ready for review August 7, 2022 01:24
@ra1028 ra1028 merged commit e8ce984 into main Aug 7, 2022
@ra1028 ra1028 deleted the feat/observable-object-did-update branch August 7, 2022 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants