Skip to content

bind is violating unidirectional flow of State #4

@SwiftyJunnos

Description

@SwiftyJunnos

bind method used for SwiftUI binding:

https://github.com/musicspot24/Dripper/blob/be997a6c5bfb4735290c01fc59be6b239c00cbec/Sources/Dripper/Station.swift#L105-L121

The current bind method implementation creates multiple paths to modify Station's state, violating the unidirectional data flow pattern.
To resolve this issue, introducing a dedicated Action to handle state updates should be available just like using pour method.

station.counter.bind(\.counterUpdated)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions