absent-sapphire•2y ago
useNavigation
replace("inquiry/create") is not work
2 Replies
Hi @hoaanhtuc. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The
replace method from the useNavigation hook in refine is used to replace the current history state instead of adding a new URL into the stack. If replace("inquiry/create") is not working as expected, it might be due to how the replace method is defined or accessed.
Here's an example of how you can use the replace method from useNavigation:
In this example, clicking the button will trigger the replace method and replace the current history state with the inquiry/create path.
If it's still not working, I would recommend checking the official refine documentation for more information on how to use the useNavigation hook and its replace method:
- useNavigation hook documentation (link (https://refine.dev/docs/api-reference/core/hooks/navigation/useNavigation/))
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@617879699363725341> kapa.ai is still learning and improving, please let us know how it did by reacting below