Skip to content

Conversation

@ra1028
Copy link
Owner

@ra1028 ra1028 commented Apr 17, 2024

Pull Request Type

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

Description

AtomScope.observe(_:) has been working implicitly as scoped observation which receives state changes of atoms used in the scope, so this PR is to make it explicit along with renaming the function name to scopedObserve(_:).
Lthough it was originally a scoped observation, it has been receiving state changes triggered by nested scopes as well but it's no longer be received by this PR.
To receive whole app state changes, use AtomRoot.observe(_:) instead. Also, to rceive state changes triggered by nested multiple scopes, use AtomScope.init(inheriting:) to inherit obsevers from ancestor scopes.

Impact on Existing Code

  • AtomScope.observe(_:) is deprecated and renamed to AtomScope.scopedObserve(_:).

@ra1028 ra1028 merged commit 10f4e42 into main Apr 17, 2024
@ra1028 ra1028 deleted the feat/scoped-observe branch April 17, 2024 12:43
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