I'm trying to develop a sequential form that also should have some pre-filled data fetched from an API. I realise that it can be modelled both using spawned actors and also parallel states, but not invoked services. This is because invoked services get terminated when leaving a state, which is not what I want since the data fetching is not synchronised with the UI state.
In the spawning actors model, I would spawn an actor init of the machine to handle the the fetch request and store it in the context for use in later UI states.
In the parallel state model I would have a parent machine that contains two parallel states, one that handles the UI state and one that handles the data fetching.
Is there any guidance on spawning actors vs parallel states?