Can the router have configuration added to optionally use history.replaceState over history.pushState? #5329
-
It would be great if we could configure the router to replace the history instead of push |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 1 reply
-
Hi, thanks for your feedback. For React InstantSearch, you can change the call to For React InstantSearch Hooks, you can use the modified history router I've shared in the discussion you created for InstantSearch.js: #5088 (comment). |
Beta Was this translation helpful? Give feedback.
Hi, thanks for your feedback.
For React InstantSearch, you can change the call to
history.push()
withhistory.replace()
in theonSearchStateChange
event handler you attach to<InstantSearch>
. You can follow this guide for more information: https://www.algolia.com/doc/guides/building-search-ui/going-further/routing-urls/react/#basic-urls.For React InstantSearch Hooks, you can use the modified history router I've shared in the discussion you created for InstantSearch.js: #5088 (comment).