Deprecate .status() and migrate members to .state
Closed this issue · 1 comments
Below are all the members of the object returned by .status()
:
- targets - array of navigation targets remaining
- trail - array of navigation targets traversed
- paused
- pending
- loops
- phase -
- active - indicates when the flow is navigating
The "read-only" .state
member should reference the properties returned in the status object.
As background, status()
was intended to return navigation details of a flow instance, not static/constant/structural aspects of the current state. However, it appears a necessary method, so as to avoid setting it's members to the flow instance directly.
In particular, this is needed when implementing an "update" directive to an owning flow. The owned flow may be at a different place from when it sent the update, since it may be at a different state by the time the owner can process the given directive.
To preserve using the .state
member as a structural reference to the current state - rather than temporal, navigation-based information, the best bet is to keep the .status()
method for now.