Skip to content

First Transition on Observable missing initial state #2

@ahayman

Description

@ahayman

When using onTransition for an Observable, the first transition from the initial state to a new state is missed. All subsequent transitions work correctly.

For example:

let value = ObservableInput(1.0)
value.onTransition { from, to in
  print("\(from) -> \(to)")
}
value.set(2.0) // prints: nil -> 2.0
value.set(3.0) // prints: 2.0 -> 3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions