Open
Description
I'm noticing that route-changed
events are triggered even if the machine gets initialized on that particular route. This leads to duplicate actions on state entry and invocations of services at the target route.
I've isolated the behavior in this sandbox:
https://codesandbox.io/s/xstate-router-forked-fyff8
my suggestion is to omit the route-changed
event and not trigger it if the route did not change or the previous event was xstate.init
.