wouter
wouter copied to clipboard
Using `useSearch` with SSR throws a hydration warning
How to reproduce:
- Create a web-server and render wouter app with
<Router ssrPath={requestUrl.pathname} ssrSearch={requestUrl.search}>
- On the client-side render your app wrapped in just
<Router />
- 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