Thanks. That clarified a lot of doubts that I had. Also I have a following suggestions about the implementation.
- The remove childCoordinator should be a custom made stack instead of an array. Will make it easy to add and remove child coordinators
- Instead of creating of coordinator class and then subclassing from it maybe you make coordinator a protocol and have others confirm to it. That would be a more “swifty” in my opinion.
I do have one doubt though. What happens if I wanted to spawn a new flow from login screen for example: Forgot Password flow. But instead of presenting Forgot Password screen I wanted to push it. How would I remove the ForgotPasswordCoordinator from the child coordinator array if the user taps the back button?