diff --git a/docs/API.md b/docs/API.md index 3a0e0ccc93..f5b0c169b6 100644 --- a/docs/API.md +++ b/docs/API.md @@ -77,13 +77,6 @@ function createElement(Component, props) { } ``` -##### `stringifyQuery(queryObject)` (deprecated) -A function used to convert an object from [``](#link)s or calls to -[`transitionTo`](#transitiontopathname-query-state) to a URL query string. - -##### `parseQueryString(queryString)` (deprecated) -A function used to convert a query string into an object that gets passed to route component props. - ##### `onError(error)` While the router is matching, errors may bubble up, here is your opportunity to catch and deal with them. Typically these will come from async features like [`route.getComponents`](#getcomponentsnextstate-callback), [`route.getIndexRoute`](#getindexroutepartialnextstate-callback), and [`route.getChildRoutes`](#getchildroutespartialnextstate-callback). @@ -95,6 +88,10 @@ This is primarily for integrating with other libraries that need to participate Ensure that you render a `` at the end of the line, passing all the props passed to `render`. +##### `stringifyQuery(queryObject)` (deprecated) + +##### `parseQueryString(queryString)` (deprecated) + #### Examples Please see the [`examples/`](/examples) directory of the repository for extensive examples of using ``. @@ -108,7 +105,7 @@ A `` can know when the route it links to is active and automatically apply #### Props ##### `to` -A [location descriptor](https://github.com/mjackson/history/blob/master/docs/Glossary.md#locationdescriptor). Usually this is a string or an object, with the following semantics: +A [location descriptor](https://github.com/ReactJSTraining/history/blob/master/docs/Glossary.md#locationdescriptor). Usually this is a string or an object, with the following semantics: * If it's a string it represents the absolute path to link to, e.g. `/users/123` (relative paths are not supported). * If it's an object it can have four keys: @@ -117,16 +114,7 @@ A [location descriptor](https://github.com/mjackson/history/blob/master/docs/Glo * `hash`: A hash to put in the URL, e.g. `#a-hash`. * `state`: State to persist to the `location`. -##### `query` **([deprecated](/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)** -An object of key:value pairs to be stringified. - -##### `hash` **([deprecated](/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)** -A hash to put in the URL, e.g. `#a-hash`. - -_Note: React Router currently does not manage scroll position, and will not scroll to the element corresponding to the hash._ - -##### `state` **([deprecated](/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)** -State to persist to the `location`. +_Note: React Router currently does not manage scroll position, and will not scroll to the element corresponding to `hash`._ ##### `activeClassName` The className a `` receives when its route is active. No active class by default. @@ -143,6 +131,12 @@ If `true`, the `` will only be active when the current route exactly match ##### *others* You can also pass props you'd like to be on the `` such as a `title`, `id`, `className`, etc. +##### `query` **([deprecated](/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)** + +##### `hash` **([deprecated](/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)** + +##### `state` **([deprecated](/upgrade-guides/v2.0.0.md#link-to-onenter-and-isactive-use-location-descriptors) see `to`)** + #### Example Given a route like ``: @@ -613,9 +607,9 @@ For more details, please see the [histories guide](/docs/guides/Histories.md). `useRouterHistory` is a `history` enhancer that configures a given `createHistory` factory to work with React Router. This allows using custom histories in addition to the bundled singleton histories. It also pre-enhances the history with the -[useQueries](https://github.com/mjackson/history/blob/master/docs/QuerySupport.md) +[useQueries](https://github.com/ReactJSTraining/history/blob/master/docs/QuerySupport.md) and -[useBasename](https://github.com/mjackson/history/blob/master/docs/BasenameSupport.md) +[useBasename](https://github.com/ReactJSTraining/history/blob/master/docs/BasenameSupport.md) enhancers from `history` #### Example diff --git a/docs/guides/Histories.md b/docs/guides/Histories.md index 1aaa160356..4ab8fe3a19 100644 --- a/docs/guides/Histories.md +++ b/docs/guides/Histories.md @@ -139,11 +139,11 @@ render( If you'd like to further customize the history options or use other enhancers from -[history](https://github.com/mjackson/history/) you can use +[history](https://github.com/ReactJSTraining/history/) you can use `useRouterHistory`. Be aware that `useRouterHistory` already pre-enhances your history -factory with the [useQueries](https://github.com/mjackson/history/blob/master/docs/QuerySupport.md) and [useBasename](https://github.com/mjackson/history/blob/master/docs/BasenameSupport.md) enhancers from `history`. +factory with the [useQueries](https://github.com/ReactJSTraining/history/blob/master/docs/QuerySupport.md) and [useBasename](https://github.com/ReactJSTraining/history/blob/master/docs/BasenameSupport.md) enhancers from `history`. ### Examples: