You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/Location.md
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,13 @@ server, the location is the URL path that was used in the request.
9
9
ReactRouter ships with several locations that make it convenient to
10
10
use in many different scenarios. They are listed below.
11
11
12
-
|`HashLocation`| Stores the current URL in `window.location.hash`. Use this if you need to support browsers that do not support the HTML5 history API |
13
-
|`HistoryLocation`| Uses the HTML5 history API to store state in clean URLs |
14
-
|`RefreshLocation`| A fallback for having clean URLs in browsers that do not support the HTML5 history API by updating `window.location` whenever the route changes. The router automatically falls back to this when you try to use `HistoryLocation` in old browsers |
15
-
|`StaticLocation`| A location for stateless environments (like servers) where the URL is given once |
16
-
|`TestLocation`| A location that allows you to easily stub out URL history when writing tests |
12
+
Location | Description
13
+
------------------- | -----------
14
+
`HashLocation` | Stores the current URL in `window.location.hash`. Use this if you need to support browsers that don't support the HTML5 history API
15
+
`HistoryLocation` | Uses the HTML5 history API to store state in clean URLs
16
+
`RefreshLocation` | A fallback that uses clean URLs in browsers that do not support the HTML5 history API by updating `window.location` whenever the route changes. The router automatically falls back to this when you try to use `HistoryLocation` in old browsers
17
+
`StaticLocation` | A location for stateless environments (like servers) where the URL is given once
18
+
`TestLocation` | A location that allows you to easily stub out URL history when writing tests
17
19
18
20
You can also supply the router with your own location implementation. The
0 commit comments