Repository navigation
Commit ac2a40f
committed
fix: resolve SSR hydration mismatch when ssrPath/ssrSearch not provided
When rendering on the client without ssrPath/ssrSearch props, usePathname and useSearch now use location.pathname and location.search as the SSR snapshot instead of defaulting to empty strings. This ensures the client-side hydration matches what was rendered on the server.1 parent 2c4ccb9 commit ac2a40f
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
41 | | - | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
0 commit comments