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

feat(packages/tuono-router): add replace method to router and replace prop to Link #596

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

m-jovan
Copy link
Contributor

@m-jovan m-jovan commented Feb 23, 2025

Checklist

Related issue

Fixes #537

Overview

This PR does the following:

  • add replace method to the instance returned by useRouter hook
  • slightly refactor inner useRouter types to avoid repetition with adding replace method
  • add replace prop to Link component that replaces the state by calling router's now added replace method

Related docs will be added with tuono-labs/tuono-documentation#30

Copy link
Member

@marcalexiei marcalexiei left a comment

Choose a reason for hiding this comment

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

Left two comments about two minor adjustments,
everything else looks goods to me.

Valerioageno
Valerioageno previously approved these changes Feb 24, 2025
Copy link
Member

@Valerioageno Valerioageno left a comment

Choose a reason for hiding this comment

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

Left few minor comments. LGTM
Thanks

@marcalexiei
Copy link
Member

@m-jovan, sorry to bother you, could you please re-request a review after you have completed the changes (more info)?
Re-requesting a review will send a single email, making it easier to find across the various threads/messages.

@Valerioageno Valerioageno self-requested a review February 24, 2025 17:45
Copy link
Member

@Valerioageno Valerioageno left a comment

Choose a reason for hiding this comment

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

🔥

@marcalexiei marcalexiei changed the title feat(packages/tuono-router): Add replace method to router and replace… feat(packages/tuono-router): add replace method to router and replace prop to Link Feb 24, 2025
@marcalexiei marcalexiei merged commit d71185c into tuono-labs:main Feb 24, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Requires typescript knowledge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request]: add router.replace fn
3 participants