To: string | Partial<Path>

Describes a location that is the destination of some navigation, either via history.push or history.replace. This may be either a URL or the pieces of a URL path.