+
Welcome to the Destination Page
+ {referrer &&
You came from the {referrer}!
}
+
+ );
+};
+```
+
## createRouterSelector
If you are worried about `useRouter` re-rendering too much, you can create custom router hooks using selectors that will trigger a re-render only when the selector output changes.
diff --git a/src/common/types.ts b/src/common/types.ts
index d87674cf..e6c28289 100644
--- a/src/common/types.ts
+++ b/src/common/types.ts
@@ -16,6 +16,7 @@ export type Location = {
pathname: string;
search: string;
hash: string;
+ state?: unknown;
};
export type BrowserHistory = (
@@ -23,8 +24,8 @@ export type BrowserHistory = (
| Omit