## back · function

Try to go back in history to the first entry that matches the given target. If none is found, the given state will replace the current page. This is useful for "cancel" or "close" actions that should return to the previous page if possible, but create a new page if not (for instance when arriving at the current page through a direct link).

Consider using `up` to go up in the path hierarchy.

**Signature:** `(target?: RouteTarget, fallback?: RouteTarget) => Promise<boolean>`

**Parameters:**

- `target: RouteTarget` (optional) - The target route to go back to. May be a subset of `Route`, or a string (for `path`), or an array of strings (for `p`).
- `fallback?: RouteTarget` - Defaults merged *under* `target` when no matching history
entry exists and the current one is replaced instead. Deliberately not part
of the match: use it for things (say, a `state`) that the replacement route
should carry but that a history entry needn't have to count as a match.

**Returns:** A promise resolving `true` once we've landed — on the matched
history entry, or on the replacement — and `false` when a guard (see
`setGuard`) vetoed the change, or when another navigation superseded
the travel before it landed.
