wouter icon indicating copy to clipboard operation
wouter copied to clipboard

Using `useSearch` with SSR throws a hydration warning

Open molefrog opened this issue 1 month ago • 0 comments

How to reproduce:

  1. Create a web-server and render wouter app with <Router ssrPath={requestUrl.pathname} ssrSearch={requestUrl.search}>
  2. On the client-side render your app wrapped in just <Router />
  3. You will see the hydration warning.

Expected: when wouter runs in the browser, by default it should fill in ssrPath and ssrSearch with current pathname and search string extracted from location

molefrog avatar May 21 '24 07:05 molefrog