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
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,17 +107,23 @@ A `<Link>` can know when the route it links to is active and automatically apply
107
107
108
108
#### Props
109
109
##### `to`
110
-
The path to link to, e.g. `/users/123`.
111
-
112
-
##### `query`
110
+
Can be either a string or an object.
111
+
* If it's a string it represents the path to link to, e.g. `/users/123`.
112
+
* If it's an object it can have four keys:
113
+
*`pathname`: A string representing the path to link to.
114
+
*`query`: An object of key:value pairs to be stringified.
115
+
*`hash`: A hash to put in the URL, e.g. `#a-hash`.
116
+
*`state`: State to persist to the `location`.
117
+
118
+
##### `query`**([Deprecated](https://github.com/reactjs/react-router/blob/master/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)**
113
119
An object of key:value pairs to be stringified.
114
120
115
-
##### `hash`
121
+
##### `hash`**([Deprecated](https://github.com/reactjs/react-router/blob/master/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)**
116
122
A hash to put in the URL, e.g. `#a-hash`.
117
123
118
124
_Note: React Router currently does not manage scroll position, and will not scroll to the element corresponding to the hash. Scroll position management utilities are available in the [scroll-behavior](https://github.com/taion/scroll-behavior) library._
119
125
120
-
##### `state`
126
+
##### `state`**([Deprecated](https://github.com/reactjs/react-router/blob/master/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)**
0 commit comments