diff --git a/docs/api-reference.md b/docs/api-reference.md index df38ba01e..16b2a0f87 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -400,6 +400,10 @@ This can be useful in situations where you need to keep track of 2 different sta ### State +```ts +type State = object | null; +``` + A [`State`](https://github.com/ReactTraining/history/blob/0f992736/packages/history/index.ts#L61) value is an object of extra information that is associated with a [`Location`](#location) but that does not appear in the URL. This value is always associated with that location. See [the Navigation guide](navigation.md) for more information. @@ -408,6 +412,16 @@ See [the Navigation guide](navigation.md) for more information. ### To +```ts +type To = string | PartialPath; + +interface PartialPath { + pathname?: string; + search?: string; + hash?: string; +} +``` + A [`To`](https://github.com/ReactTraining/history/blob/0f992736/packages/history/index.ts#L212) value represents a destination location, but doesn't contain all the information that a normal [`location`](#location) object does. It is primarily used as the first argument to [`history.push`](#history.push) and [`history.replace`](#history.replace). See [the Navigation guide](navigation.md) for more information. \ No newline at end of file