Skip to content

Using useSearch with SSR throws a hydration warning #446

@molefrog

Description

@molefrog

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions