hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
45 stars 14 forks source link

Update to latest wouter-preact with improved useParams() #6420

Closed acelaya closed 6 days ago

acelaya commented 6 days ago

In previous wouter-preact versions, calling useParams() in a nested route would only return the params for that specific route and not any potential parent.

Starting with v3.3, this is no longer the case, which allow us to simplify a bit some logic we had in DashboardApp where we had to call useParams() in order to pass a param down to OrganizationActivity.

Now we can call useParams() directly in OrganizationActivity, as we do in other dashboard activity components.

See the release notes for reference https://github.com/molefrog/wouter/releases/tag/v3.3.0