Skip to content

Commit 8439fdd

Browse files
update the docs for browserrouter in the example of basename. (#7277)
1 parent 26aa871 commit 8439fdd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/react-router-dom/docs/api/BrowserRouter.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ A [`<Router>`](../../../react-router/docs/api/Router.md) that uses the HTML5 his
1818
The base URL for all locations. If your app is served from a sub-directory on your server, you'll want to set this to the sub-directory. A properly formatted basename should have a leading slash, but no trailing slash.
1919

2020
```jsx
21-
<BrowserRouter basename="/calendar" />
22-
<Link to="/today"/> // renders <a href="/calendar/today">
21+
<BrowserRouter basename="/calendar">
22+
<Link to="/today"/> // renders <a href="/calendar/today">
23+
<Link to="/tomorrow"/> // renders <a href="/calendar/tomorrow">
24+
...
25+
</BrowserRouter>
2326
```
2427

2528
## getUserConfirmation: func

0 commit comments

Comments
 (0)