When dispatching a message in a child view using a different type of message, we rely on ViewNode having both the MapMsg function set and a reference to the parent ViewNode to be able to map the child message to the app root message type.
Except during the ApplyDiff, the scalar properties (including MapMsg) were updated before the children.
This could result in the GrandGrandChild to try to dispatch a message while the hierarchy is changing.
To avoid this, we first update the children and then the scalar properties.
When dispatching a message in a child view using a different type of message, we rely on
ViewNode
having both theMapMsg
function set and a reference to the parentViewNode
to be able to map the child message to the app root message type.Except during the
ApplyDiff
, the scalar properties (including MapMsg) were updated before the children. This could result in the GrandGrandChild to try to dispatch a message while the hierarchy is changing.To avoid this, we first update the children and then the scalar properties.