ScanSkill

BrowserRouter

The BrowserRouter component is a router component that uses the HTML5 history API (pushStatereplaceState, and the popstate event) to keep your UI in sync with the URL. This means that the BrowserRouter history library helps React Router keep track of the browsing history of the application using the browser’s built-in history stack. The Routes component is wrapped inside the BrowserRouter component.

Example

import { BrowserRouter } from 'react-router-dom'

function App(){
	return(
	  <BrowserRouter>
	    <Routes>
	     // define routes path and its components
	    </Routes>
	  </BrowserRouter>
	);
}
export default App;