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.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ A `<Link>` can know when the route it links to is active and automatically apply
94
94
95
95
#### Props
96
96
##### `to`
97
-
A [location descriptor](https://github.com/ReactTraining/history/blob/master/docs/Glossary.md#locationdescriptor). Usually this is a string or an object, with the following semantics:
97
+
A [location descriptor](https://github.com/ReactTraining/history/blob/master/docs/Glossary.md#locationdescriptor) or a function that takes the current location and returns a location descriptor. This location descriptor is usually a string or an object, with the following semantics:
98
98
99
99
* If it's a string it represents the absolute path to link to, e.g. `/users/123` (relative paths are not supported).
100
100
* If it's an object it can have four keys:
@@ -105,6 +105,23 @@ A [location descriptor](https://github.com/ReactTraining/history/blob/master/doc
105
105
106
106
_Note: React Router currently does not manage scroll position, and will not scroll to the element corresponding to `hash`._
0 commit comments