As described on the serialising flows, you should be able to serialise a Flow to a ConanState that suits you, and then leverage all the features of the Conan State to observe it.
We have though some mechanisms to provide you with a shortcut when observing flows
As of v1.0 we only have hooks, but we are planning to add more shortcuts to observe directly flows without having to serialise them
Hooks
useFlow
useFlow<AuthenticationState,AuthenticationFlow>(
authentication$F,
setState,
(status, previousState)=>({
...previousState,
current: status.name,
})
);
This hook receives
a flow
the method to set the state for this component
a function that returns the new state and that takes