We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b93c0f9 commit 10b398fCopy full SHA for 10b398f
.changeset/stupid-trainers-shake.md
@@ -0,0 +1,5 @@
1
+---
2
+"@solidjs/router": patch
3
4
+
5
+Make useHref return a string with string param
src/routing.ts
@@ -68,7 +68,7 @@ export const useResolvedPath = (path: () => string) => {
68
return createMemo(() => route.resolvePath(path()));
69
};
70
71
-export const useHref = <T extends string | undefined>(to: () => T): string | T => {
+export const useHref = <T extends string | undefined>(to: () => T): () => string | T => {
72
const router = useRouter();
73
return createMemo(() => {
74
const to_ = to();
0 commit comments