Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export matchRoute function #456

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Jun 17, 2024

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 #455

Copy link

stackblitz bot commented Jun 17, 2024

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a type test, but I didn't add a regular logic test, as the useRoute test already covers all paths inside matchRoute.

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@molefrog molefrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you

@molefrog molefrog merged commit d7305d0 into molefrog:v3 Jun 17, 2024
4 checks passed
@acelaya acelaya deleted the export-match-route branch June 17, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider exposing matchRoute helper function
2 participants