github molefrog/wouter v3.3.0
Route parameters inheritance

latest release: v3.3.1
13 days ago

Parameters provided by a Route component or received from calling useParams now also contain values inherited from parent nested routes. See #461 and #409.

Example:

// given the location is "/blog/1/users/4"

<Route path="/:page/:id" nest>
  <Route path="/users/:id">
     {/* calling `useParams()` here will return an object containing `{ page: "blog", id: "4" }`
     {/* note: duplicate keys are overwritten by the inner-most route */}
  </Route>
</Route>

Don't miss a new wouter release

NewReleases is sending notifications on new releases.