Function
The route being left
The route being entered
The motion to play, or "none" when both are the same route
The rule reads where each route sits in the app rather than which link was followed, because the same link component is rendered at different depths: a "Resume" tile goes deeper from My learning and sideways from another lesson.
Locale prefixes, query strings, hashes and trailing slashes are ignored, so
a raw location.pathname is as good an input as a locale-less href.
Chooses the motion for a route change from the two routes it connects.