Skip to content

Conversation

@ra1028
Copy link
Owner

@ra1028 ra1028 commented Sep 3, 2022

Pull Request Type

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

Issue for this PR

Link: close #17

Description

The current observability API done with AtomObserver has too few functionalities as it just can observe what atom is registered/released/updated and that's it.
It would be better to support more powerful functionalities like accessing arbitrary atom values through a Snapshot structure.
Also, currently Snapshot.restore() can only reset the current value to be the snapshotted value, but it should reset the whole store state to be the snapshotted one to prevent inconsistency.

Impact on Existing Code

The following APIs have been abolished.

  • AtomObserver
  • AtomRoot/observe(_: AtomObserver)
  • AtomRelay/observe(_: AtomObserver)

@ra1028 ra1028 merged commit afb44e5 into main Sep 4, 2022
@ra1028 ra1028 deleted the feat/better-observablity branch September 4, 2022 09:49
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.

[Feat Request]: Better observability/restorability

2 participants