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

[Bug]: { replace: true} ignored in useEffect #9132

Closed
matapo opened this issue Aug 4, 2022 · 1 comment
Closed

[Bug]: { replace: true} ignored in useEffect #9132

matapo opened this issue Aug 4, 2022 · 1 comment
Labels

Comments

@matapo
Copy link

matapo commented Aug 4, 2022

What version of React Router are you using?

6.3.0

Steps to Reproduce

  useEffect(() => {
 
    navigate("NotFound", { replace: true });

  }, [navigate]);

Expected Behavior

I expect to replace url path to example.com/NotFound

Actual Behavior

url path is example.com/SomeRoute/NotFound

@matapo matapo added the bug label Aug 4, 2022
@matapo
Copy link
Author

matapo commented Aug 4, 2022

  useEffect(() => {
 
    navigate("/NotFound", { replace: true });

  }, [navigate]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant