From eb6ca11796fdd3dc0bed2a68ffe6769e07591531 Mon Sep 17 00:00:00 2001 From: Tim Dorr Date: Tue, 2 Nov 2021 16:57:08 -0400 Subject: [PATCH] Restore the State export in the types --- packages/history/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/history/index.ts b/packages/history/index.ts index 2adc25bc..7106198a 100644 --- a/packages/history/index.ts +++ b/packages/history/index.ts @@ -48,6 +48,14 @@ export type Search = string; */ export type Hash = string; +/** + * An object that is used to associate some arbitrary data with a location, but + * that does not appear in the URL path. + * + * @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location.state + */ +export type State = object | null; + /** * A unique string associated with a location. May be used to safely store * and retrieve data in some other storage API, like `localStorage`.