);
};
```
All the components internally call the `useLocation` hook.
#### Additional navigation parameters
The setter method of `useLocation` can also accept an optional object with parameters to control how
the navigation update will happen.
When browser location is used (default), `useLocation` hook accepts `replace` flag to tell the hook to modify the current
history entry instead of adding a new one. It is the same as calling `replaceState`.
```jsx
const [location, navigate] = useLocation();
navigate("/jobs"); // `pushState` is used
navigate("/home", { replace: true }); // `replaceState` is used
```
Additionally, you can provide a `state` option to update `history.state` while navigating:
```jsx
navigate("/home", { state: { modal: "promo" } });
history.state; // { modal: "promo" }
```
#### Customizing the location hook
By default, **wouter** uses `useLocation` hook that reacts to `pushState` and `replaceState`
navigation via `useBrowserLocation`.
To customize this, wrap your app in a `Router` component:
```js
import { Router, Route } from "wouter";
import { useHashLocation } from "wouter/use-hash-location";
const App = () => (