Skip to content

feat(useNavigate): improve useNavigate to check if route exists in ember #66

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LeonardoRick
Copy link
Collaborator

@LeonardoRick LeonardoRick commented Jul 14, 2025

Description

This PR improves the useNavigate polymorphic hook to enable the usage of a single navigation method for both:

  • React --> Ember
  • React --> React

This way we can always import useNavigate as

import { useNavigate } from '@qonto/react-migration-toolkit';

Whenever we want to navigate in a react codebase that coexist with an Ember application.

IMPORTANT NOTE: For the method to work properly, the application should have the exact same react-router version that is being used in the repo (At the moment of this PR - "react-router": "7.6.3" )

@LeonardoRick LeonardoRick force-pushed the feat-react-routing-single-navigation-method branch 3 times, most recently from e6ec9f8 to efbcd55 Compare July 14, 2025 12:57
@LeonardoRick LeonardoRick force-pushed the feat-react-routing-single-navigation-method branch from efbcd55 to 5952af9 Compare July 14, 2025 13:02
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.

1 participant