Thank you for your answer.
I have a mediator which manages the currentState of its view. I'm going to change that and make the view manage its view states
My main question still remains
.
Imagine my main application mxml file (main.mxml) having two view components panel P1 and panel P2.
Each panel has its own mxml file (in the view/components directory).
P1 has a mediator M1 and P2 has a mediator M2 (each mediator has its own source file in view directory).
I define states and transitions of my application in the main.mxml file.
Suppose, base view state has both panels and another view state S1 has only panel P1.
Changing from base state to S1 will remove child P2.
Do I have to remove M2 before this states transition ?
Do I have to create once again M2 after a transition from S1 to base state ?