[]previous and next page

useLocation

The current location.

The current location. Read the properties inside a computation to track them.

Import#

ts
import { useLocation } from "@shadow-js/router";

Signature#

ts
function useLocation(): LocationView

Returns#

A live view.

Examples#

ts
insert(el, () => useLocation().pathname);