Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

HashRouter

// React Router v6:
// <Router> which syncs 'window.location.hash' with the UI
// *** NOTE: strongly recommended to avoid using unless you need to ***
import ReactDOM from 'react-dom';
import { HashRouter } from 'react-router-dom';

ReactDOM.render(
  <HashRouter>
    {/* The rest of your app goes here */}
  </HashRouter>,
  root
);
Source by reactrouter.com #
 
PREVIOUS NEXT
Tagged: #HashRouter
ADD COMMENT
Topic
Name
6+9 =