molefrog / wouter

🥢 A minimalist-friendly ~2.1KB routing for React and Preact
https://npm.im/wouter
The Unlicense
6.65k stars 152 forks source link

Export `matchRoute` function #456

Closed acelaya closed 3 months ago

acelaya commented 3 months ago

This PR allows users to import the matchRoute function that is internally used by useRoute or <Switch />, allowing custom dynamic logic or route checks outside of component scope.

Closes https://github.com/molefrog/wouter/issues/455

stackblitz[bot] commented 3 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (6abe383) to head (d71b288).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## v3 #456 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 1 1 Lines 1 1 ========================================= Hits 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.