Using react-router I\'m looking for a way to update the page URL / hash, without the router re-rendering the whole page.
I am developing a full page carousel, and wo
For React router v4 you need to use history and pass it as prop to the Router. Router will then pass history object to your component as a prop and you can use it like so:
// In your component
this.props.history.push("#testing")
History file
// history.js
import createHistory from "history/createBrowserHistory";
export default createHistory();
Then, wherever you are declaring your router, pass the history prop
import history from "./history";
import { Router } from "react-router-dom";
// ... Your component