Skip to content

Commit 10b398f

Browse files
ryansolidsugar700
authored andcommitted
Create stupid-trainers-shake.md
1 parent b93c0f9 commit 10b398f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/stupid-trainers-shake.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/router": patch
3+
---
4+
5+
Make useHref return a string with string param

src/routing.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const useResolvedPath = (path: () => string) => {
6868
return createMemo(() => route.resolvePath(path()));
6969
};
7070

71-
export const useHref = <T extends string | undefined>(to: () => T): string | T => {
71+
export const useHref = <T extends string | undefined>(to: () => T): () => string | T => {
7272
const router = useRouter();
7373
return createMemo(() => {
7474
const to_ = to();

0 commit comments

Comments
 (0)