September 2018
Beginner
156 pages
3h 28m
English
The <BrowserRouter> component was discussed briefly in the first chapter. As the name suggests, the <BrowserRouter> component is used in browser-based applications and it uses HTML5's history API to keep the UI in sync with the browser's URL. Here, we take a look at how the component creates a history object for the browser environment and provides this history object to the <Router>.
The <BrowserRouter> component accepts the following props:
static propTypes = { basename: PropTypes.string, forceRefresh: PropTypes.bool, getUserConfirmation: PropTypes.func, keyLength: PropTypes.number, children: PropTypes.node};
Similar to the <Router> interface, the <BrowserRouter> accepts only one child component (usually the application's ...
Read now
Unlock full access