The 'location' prop in <Switch> allows you to specify a location object that <Switch> will use instead of the current location. This is useful for animations and transitions between routes.