Skip to content

Conversation

@ra1028
Copy link
Owner

@ra1028 ra1028 commented Apr 30, 2024

Pull Request Type

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

Description

The naming context.state(_:) doesn't well imply that it returns a Binding, and its existence often goes unnoticed, so it's renamed context.binding(_:) that implies directly that it returns a Binding to the atom state.
Also, now that only AtomViewContext has context.binding(:_) because it was not needed to allow it to be used on selector atoms.

Impact on Existing Code

  • AtomWatchableContext.state(_:) is deprecated.
  • AtomViewContext.binding(_:) is added.

@ra1028 ra1028 force-pushed the feat/rename-state-to-binding branch from f9ce00e to 6582bd3 Compare April 30, 2024 06:36
@ra1028 ra1028 force-pushed the feat/rename-state-to-binding branch from 6582bd3 to 557965a Compare April 30, 2024 06:49
@ra1028 ra1028 merged commit 3180743 into main Apr 30, 2024
@ra1028 ra1028 deleted the feat/rename-state-to-binding branch April 30, 2024 06:56
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